roadlabs / cefpython

Automatically exported from code.google.com/p/cefpython
0 stars 0 forks source link

Message loop should be started before creating browser #62

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It seems that creating browser before message loop has started
may lead to app crashes, see this topic [1] and Marshall's 
response. If you look at the cefclient sources [2] you will
see that that message loop is run after CefInitialize(),
the browser is created in WM_CREATE message so the message 
loop is already running.

To create browser after the message loop has started use the
CefPostTask() function to post a task on the UI thread, this
function is not yet implemented, see Issue 61 "Posting tasks
on various threads (UI, IO, FILE)".

[1] http://magpcss.org/ceforum/viewtopic.php?f=6&t=10725
[2] 
https://code.google.com/p/chromiumembedded/source/browse/trunk/cef1/tests/cefcli
ent/cefclient_win.cpp?r=r1273

Original issue reported on code.google.com by czarek.t...@gmail.com on 6 Jun 2013 at 8:12

GoogleCodeExporter commented 9 years ago
Turns out that the crash in the referenced topic was caused by some
other factor, but still let's keep in mind that this might need
fixing in some future. For now, closing.

Original comment by czarek.t...@gmail.com on 7 Jun 2013 at 8:49