Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux/OSX: browser creation fails once in a while #8

Open
cztomczak opened this issue Feb 10, 2014 · 11 comments
Open

Linux/OSX: browser creation fails once in a while #8

cztomczak opened this issue Feb 10, 2014 · 11 comments

Comments

@cztomczak
Copy link
Owner

It happened only once. Couldn't reproduce anymore.

Was it CEF fault? or GTK fault?

From the logs, compared to other successful launches, I see that there was one message missing, about the sandbox missing "Running renderer without sandbox". So it seems that the call to cef_create_browser_sync() failed. Did it return a null pointer? Need to add a check for that.

It would be a good idea to do some stress testing. Do 1000 launches of application and see if we can reproduce the problem.

@cztomczak
Copy link
Owner Author

Added commit 1a7d869 to check whether browser failed.

@cztomczak
Copy link
Owner Author

Reported problem on CEF Forum:
http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=11470

@cztomczak
Copy link
Owner Author

Marshall says that there were numerous reports of problems when using the synchronous version of browser creation function. The solution will be to create browser asynchronously. A minor fix for windows is required to call WindowResized() after some delay.

Fix commited in revision f95b131.

@cztomczak
Copy link
Owner Author

Unfortunately the problem still persists. Browser creation fails. But this time I don't see an empty window. When browser creation fails in CEF, then CEF sends a signal to destroy window. Thus cef_quit_message_loop() is called and application quits.

Happens about 1/40 launches of application.

@cztomczak cztomczak reopened this Feb 11, 2014
@cztomczak
Copy link
Owner Author

Same problem noticed also on OSX, branch 1750.

It seems that branch 1750 is just unstable. Latest Google Chrome stable is 32 / branch 1700. We will have to wait for until 1750 makes it into mainstream.

Still it would be good to create an example that can reproduce the issue, using cefsimple C++ example. See the topic on the CEF Forum from third post.

@cztomczak
Copy link
Owner Author

After applying some fixes to CEF structures initialization, and by providing app and client handlers to cef_execute_process/cef_initialize (see Issue #10 ), I can't reproduce this issue anymore on Linux.

The issue still persists on OS X.

@jhvst
Copy link

jhvst commented Mar 17, 2014

Same bug noticed on Ubuntu 12.04. I'm using the resources you've linked in the latest readme.

@cztomczak cztomczak changed the title OSX: browser creation fails once in a while Linux/OSX: browser creation fails once in a while Mar 17, 2014
@cztomczak
Copy link
Owner Author

There is an Issue created in CEF to stress test application launching, to detect and fix this problem:
https://code.google.com/p/chromiumembedded/issues/detail?id=1207

The crash may not necessarily be happening during browser creation. I've observed similar issues in branch 1650 on Linux when using CEF C++ API in CEF Python. The crash occurs during launch of a subprocess after a call to CefInitialize, no browser is being created. See this post for more details:
http://www.magpcss.org/ceforum/viewtopic.php?p=22227#p22227

@cztomczak
Copy link
Owner Author

In Issue #13 quirkey states that this issue disappeared after implementing CefLifespanHandler. He also made some other changes to code that could affect CEF execution, see quirkey's fork for details.

EDIT. I meant Issue 13.

@cztomczak
Copy link
Owner Author

After creating some tests the issue was still reproducible in quirkey's fork.

I have some good news. By offloading CPU during CEF initialization I was able to get rid of segmentation faults in CEF Python. This should work for CEF2go as well. See:
https://code.google.com/p/cefpython/issues/detail?id=131#c2

EDIT: quirkey confirmed that this fixed the issue in cef2go. See #13 (comment)

@cztomczak
Copy link
Owner Author

A corresponding issue in CEF tracker (star it so that it gets more attention):
https://code.google.com/p/chromiumembedded/issues/detail?id=1362

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants