Failed to launch GPU process when enable CEF_USE_SANDBOX

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Failed to launch GPU process when enable CEF_USE_SANDBOX

Postby jasonswordt2 » Tue Mar 14, 2017 8:31 am

I upgrade my project to vs2015 for sandbox. but when i enable this feature, i always found that no renderer process was created.

the error only says:
Code: Select all
[0314/211027.982:ERROR:browser_gpu_channel_host_factory.cc(113)] Failed to launch GPU process.
[0314/211027.982:ERROR:browser_gpu_channel_host_factory.cc(113)] Failed to launch GPU process.
[0314/211027.982:ERROR:browser_gpu_channel_host_factory.cc(113)] Failed to launch GPU process.
[0314/211039.908:ERROR:browser_gpu_channel_host_factory.cc(113)] Failed to launch GPU process.


when i disable it, it works fine.
I want to enable this feature because i need to load some plugin.
I don't know what's the key differences between my MFC APP and cefclient demo.
so what should i do?
jasonswordt2
Techie
 
Posts: 13
Joined: Wed Jan 04, 2017 8:18 pm

Re: Failed to launch GPU process when enable CEF_USE_SANDBOX

Postby Czarek » Thu Mar 16, 2017 9:14 am

Are you using single process mode?

See cefclient_win.cc and see CEF_USE_SANDBOX usage.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: Failed to launch GPU process when enable CEF_USE_SANDBOX

Postby jasonswordt2 » Fri Mar 17, 2017 4:54 am

Czarek wrote:Are you using single process mode?

See cefclient_win.cc and see CEF_USE_SANDBOX usage.


Code: Select all
BOOL CMFCApplication1App::InitInstance()
{
    // Enable High-DPI support on Windows 7 or newer.
    CefEnableHighDPISupport();

    void* sandbox_info = NULL;

#if defined(CEF_USE_SANDBOX)
    // Manage the life span of the sandbox information object. This is necessary
    // for sandbox support on Windows. See cef_sandbox_win.h for complete details.
    CefScopedSandboxInfo scoped_sandbox;
    sandbox_info = scoped_sandbox.sandbox_info();
#endif

    // Provide CEF with command-line arguments.
    CefMainArgs main_args(GetModuleHandle(NULL));

    // CEF applications have multiple sub-processes (render, plugin, GPU, etc)
    // that share the same executable. This function checks the command-line and,
    // if this is a sub-process, executes the appropriate logic.
    int exit_code = CefExecuteProcess(main_args, NULL, sandbox_info);
    if (exit_code >= 0) {
        // The sub-process has completed so return here.
        return exit_code;
    }

    // Specify CEF global settings here.
    CefSettings settings;

#if !defined(CEF_USE_SANDBOX)
    settings.no_sandbox = true;
#endif

    // SimpleApp implements application-level callbacks for the browser process.
    // It will create the first browser instance in OnContextInitialized() after
    // CEF has initialized.
    CefRefPtr<SimpleApp> app(new SimpleApp);

    //settings.multi_threaded_message_loop = 1;

    // Initialize CEF.
    bool bret =  CefInitialize(main_args, settings, app.get(), sandbox_info);

    CefRunMessageLoop();

    CefShutdown();

    return FALSE;
}

I did nothing but run the cef message loop only,still no gpu process created.maybe MFC is not supported by SAND_BOX feature?
jasonswordt2
Techie
 
Posts: 13
Joined: Wed Jan 04, 2017 8:18 pm

Re: Failed to launch GPU process when enable CEF_USE_SANDBOX

Postby Czarek » Fri Mar 17, 2017 6:13 am

cefclient example also includes cef_sandbox.lib, see its source.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 67 guests