Open cztomczak opened 7 years ago
Someone on CEF Forum says he resolved the issue by getting rid of a double call to NSApp.finishLaunching
. Quote:
It seems to happen in apps that call [NSApp finishLaunching], enter their own message loop (instead of [NSApp run]) and then CefDoMessageLoopWork() (which eventually calls [NSApp run], which calls finishLaunching.) The double call to finishLaunching is what breaks things. Apps that don't call [NSApp run] should avoid calling [NSApp finishLaunching] if they are ever going to call CefDoMessageLoopWork().
Ref: http://magpcss.org/ceforum/viewtopic.php?p=36375#p36375
See .mm demo app that shows how to avoid problem: https://github.com/dankegel/tinycef/blob/50bd38d5395c46a47a1aa6c5db112526c95038b1/tiny.mm
This crash occurs due to CefInitialize / CefDoMessageLoopWork calls. It crashes even when no browser is being embedded. When CefInitialize call is removed the crash disappears.
A similar issue was reported on CEF Forum: http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=11827
I've found some information on web suggesting that creating a menu in app should resolve issue, but it didn't.
It should also be noted that on Mac the gtk3.py example doesn't yet implement obtaining window handle (nsview pointer) due to missing funcionality in pygobject. However this is not the cause of the crash.
Complete logs: