What could be the cause for a random failure of browser creation? I'm calling cef_browser_host_create_browser_sync(). It happened today once that the window was empty - looks like the creation of browser failed. I didn't check what was returned, whether the pointer was null, added this code just now, so I will now if it happens again. I couldn't reproduce the problem. Now I'm wondering what could go wrong. The code is like this:
- Code: Select all
cef.Initialize(settings)
// Create GTK window.
gtk.Initialize()
window := gtk.CreateWindow("cef2go example", 1024, 768)
// Create browser.
url := "file://" + cwd + "/example.html"
cef.CreateBrowser(window, browserSettings, url)
When I compared logs with launches that were successful, the only thing that differed was that it was missing the "Running renderer without sandbox" error in the console. Normally when browser creation succeeds I always see this message, as no sandbox info is set.
I recall that in the cefsimple example, the browser is created in OnContextInitialized. And am wondering now whether it is guaranteed for the context to be initialized after CefInitialize() returns?
I am thinking on creating some stress test, to launch application for 1000 times and see if I can reproduce this.
Using branch 1750 revision 1604 on Ubuntu 64-bit.
Thanks for taking a look at this.