Execution problem with CefBrowserHost::CreateBrowserSyn

Do not post support requests, bug reports or feature requests. Discuss CEF here. Non-CEF related discussion goes in General Discussion!

Execution problem with CefBrowserHost::CreateBrowserSyn

Postby tgayet » Wed Sep 25, 2019 5:06 am

Hi guys,

i am trying to launch CEF3 (76.1.13+gf19c584+chromium-76.0.3809.132 / linux64) inside a dynamic library using the windowless_rendering_enabled mode in order to have a backend process used to process and rendered the url.

I am tring to work with the following gst module : https://github.com/centricular/gstcefsrc : this project tranform the video output of the CEF browser as a source for a gstreame1.0 pipeline (great project).

Indeed it works fine with a simple url but there is issues with the webrtc support that's why i want to upgrade the version of the CEF ; API of the internal interface have been upgraded in order to be buildable but the problem is at runtime !

It works fine with an old release of CEF (3.3440.1806.g65046b7) but with the latest one, my execution crash with several errors :

(...)
InitializeSandbox() called with multiple threads in process gpu-process.
(...)
Zygote could not fork: process_type renderer numfds 5 child_pid -1
(...)


The sample code of my program is the following one :

Code: Select all
  gboolean                      ret             = FALSE;
  GstCefSrc*                    src             = NULL;
  CefMainArgs                   args(0, NULL);
  CefSettings                   settings;
  CefRefPtr<RenderHandler>      renderHandler   = NULL;
  CefRefPtr<BrowserClient>      browserClient;
  CefRefPtr<CefDictionaryValue> extra_info      = NULL;
  CefRefPtr<CefRequestContext>  request_context = NULL;
  CefRefPtr<CefBrowser>         browser;
  CefWindowInfo                 window_info;
  CefBrowserSettings            browserSettings;

  src             = GST_CEF_SRC(base_src);
  renderHandler   = new RenderHandler(src);

  // Define settings
  //settings.single_process               = true;
  settings.multi_threaded_message_loop  = false;
  settings.no_sandbox                   = true;
  settings.windowless_rendering_enabled = true;
  settings.remote_debugging_port        = 2012;
  /*settings.SetOffScreenRenderingBestPerformanceArgs();
  settings.CefCommandLineArgs.Add("disable-gpu", "1");
  settings.CefCommandLineArgs.Add("disable-gpu-compositing", "1");
  settings.CefCommandLineArgs.Add("enable-begin-frame-scheduling", "1");*/

  // Change several browser settings
  browserSettings.background_color = 0;

  CefString(&settings.browser_subprocess_path).FromASCII(CEF_SUBPROCESS_PATH);

  if (!CefInitialize(args, settings, nullptr, nullptr)) {
    GST_ERROR_OBJECT(src, "Failed to initialize CEF");
    goto done;
  }

  window_info.SetAsWindowless(0);

  browserClient = new BrowserClient(renderHandler);

  /* We create the browser outside of the lock because it will call the paint callback synchronously */
  browser = CefBrowserHost::CreateBrowserSync(window_info,
                                              browserClient.get(),
                                              src->url,
                                              browserSettings,
                                              extra_info,
                                              request_context);


My processing is located within a dynamic library and launch inside a binary.

If i well remember, new version of CEF start with an among of other process, started by zygote.

Maybe my problem is that i need to disable zigote and to start as a single process.

What do you think about ?

Best Regards.

Thierry
tgayet
Techie
 
Posts: 27
Joined: Wed Apr 24, 2019 6:53 am

Re: Execution problem with CefBrowserHost::CreateBrowserSyn

Postby Czarek » Wed Sep 25, 2019 3:59 pm

Complete logs would be useful.
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 CEF Discussion

Who is online

Users browsing this forum: No registered users and 19 guests