JCEF Mac crashes and CrBrowserMain / AppKit Threads

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

JCEF Mac crashes and CrBrowserMain / AppKit Threads

Postby Chrix » Wed Apr 09, 2014 3:25 pm

Hi:

When running MainFrame.java, we usually quickly trigger one of the random crashes described in these reports.
https://code.google.com/p/javachromiume ... tail?id=23
https://code.google.com/p/javachromiume ... tail?id=41

CEF cefclient app seems pretty stable on the Mac. So clearly the JVM/AWT/java launcher bring something unique to the table... I notice a big difference between CEF cefclient app and Java/JCEF/MainFrame. In CEF cefclient, the UI thread seems to be unambiguously CrBrowserMain. But what is it supposed to be in Java/JCEF/MainFrame's case? In that case, we both have AppKit Thread and CrBrowserMain. My question for the CEF/JCEF wizards on this forum is: what do we expect the CrBrowserMain and AppKit threads to do / not do when embedding CEF inside Java? I realize OSR/non OSR cause some differences but both modes are affected by the random crashes so hopefully they have something in common...

Thanks for any tip,
Christophe


Here are a few thread dumps obtained with lldb on the Mac (latest 1750 CEF and JCEF).

CEF cefclient: CrBrowserMain seems to be the one UI thread running the event loop
* thread #1: tid = 0x3f52b, 0x00007fff878a8a1a libsystem_kernel.dylib`mach_msg_trap + 10, name = 'CrBrowserMain', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
* frame #0: 0x00007fff878a8a1a libsystem_kernel.dylib`mach_msg_trap + 10
frame #1: 0x00007fff878a7d18 libsystem_kernel.dylib`mach_msg + 64
frame #2: 0x00007fff8a29b155 CoreFoundation`__CFRunLoopServiceMachPort + 181
frame #3: 0x00007fff8a29a779 CoreFoundation`__CFRunLoopRun + 1161
frame #4: 0x00007fff8a29a0b5 CoreFoundation`CFRunLoopRunSpecific + 309
frame #5: 0x00007fff8ec4aa0d HIToolbox`RunCurrentEventLoopInMode + 226
frame #6: 0x00007fff8ec4a7b7 HIToolbox`ReceiveNextEventCommon + 479
frame #7: 0x00007fff8ec4a5bc HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 65
frame #8: 0x00007fff8d1643de AppKit`_DPSNextEvent + 1434
frame #9: 0x00007fff8d163a2b AppKit`-[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 122
frame #10: 0x00007fff8d157b2c AppKit`-[NSApplication run] + 553
frame #11: 0x0000000100195091 Chromium Embedded Framework`___lldb_unnamed_function5665$$Chromium Embedded Framework + 353
frame #12: 0x000000010019499c Chromium Embedded Framework`___lldb_unnamed_function5651$$Chromium Embedded Framework + 92
frame #13: 0x00000001001d3250 Chromium Embedded Framework`___lldb_unnamed_function6551$$Chromium Embedded Framework + 144
frame #14: 0x00000001001ec2fa Chromium Embedded Framework`___lldb_unnamed_function7033$$Chromium Embedded Framework + 26
frame #15: 0x00000001001d2bed Chromium Embedded Framework`___lldb_unnamed_function6539$$Chromium Embedded Framework + 29
frame #16: 0x00000001000eb6b2 Chromium Embedded Framework`___lldb_unnamed_function2482$$Chromium Embedded Framework + 178
frame #17: 0x000000010001b2c4 cefclient`___lldb_unnamed_function564$$cefclient + 484
frame #18: 0x0000000100004224 cefclient`___lldb_unnamed_function1$$cefclient + 52


Java/JCEF/MainFrame.java

* thread #1: tid = 0x40711, 0x00007fff878a8a1a libsystem_kernel.dylib`mach_msg_trap + 10, name = 'AppKit Thread', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
* frame #0: 0x00007fff878a8a1a libsystem_kernel.dylib`mach_msg_trap + 10
frame #1: 0x00007fff878a7d18 libsystem_kernel.dylib`mach_msg + 64
frame #2: 0x00007fff8a29b155 CoreFoundation`__CFRunLoopServiceMachPort + 181
frame #3: 0x00007fff8a29a779 CoreFoundation`__CFRunLoopRun + 1161
frame #4: 0x00007fff8a29a0b5 CoreFoundation`CFRunLoopRunSpecific + 309
frame #5: 0x00007fff8ec4aa0d HIToolbox`RunCurrentEventLoopInMode + 226
frame #6: 0x00007fff8ec4a7b7 HIToolbox`ReceiveNextEventCommon + 479
frame #7: 0x00007fff8ec4a5bc HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 65
frame #8: 0x00007fff8d1643de AppKit`_DPSNextEvent + 1434
frame #9: 0x00007fff8d163a2b AppKit`-[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 122
frame #10: 0x0000000108bef6f4 libosxapp.dylib`-[NSApplicationAWT nextEventMatchingMask:untilDate:inMode:dequeue:] + 124
frame #11: 0x00007fff8d157b2c AppKit`-[NSApplication run] + 553
frame #12: 0x0000000108bef557 libosxapp.dylib`+[NSApplicationAWT runAWTLoopWithApp:] + 156
frame #13: 0x0000000108b47ba9 liblwawt.dylib`-[AWTStarter starter:] + 873
frame #14: 0x00007fff8b51413e Foundation`__NSThreadPerformPerform + 229
frame #15: 0x00007fff8a2a9731 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
frame #16: 0x00007fff8a29aea2 CoreFoundation`__CFRunLoopDoSources0 + 242
frame #17: 0x00007fff8a29a62f CoreFoundation`__CFRunLoopRun + 831
frame #18: 0x00007fff8a29a0b5 CoreFoundation`CFRunLoopRunSpecific + 309
frame #19: 0x0000000100007378 java`CreateExecutionEnvironment + 871
frame #20: 0x0000000100001b27 java`JLI_Launch + 1995
frame #21: 0x00000001000076d5 java`main + 101
frame #22: 0x0000000100001354 java`start + 52

* thread #25: tid = 0x40782, 0x00007fff878ac716 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'CrBrowserMain'
* frame #0: 0x00007fff878ac716 libsystem_kernel.dylib`__psynch_cvwait + 10
frame #1: 0x00007fff94c4ac3b libsystem_pthread.dylib`_pthread_cond_wait + 727
frame #2: 0x0000000112e3f45c libjogl_desktop.jnilib`___lldb_unnamed_function81$$libjogl_desktop.jnilib + 300
frame #3: 0x0000000112e3f709 libjogl_desktop.jnilib`waitUntilNSOpenGLLayerIsReady + 121
frame #4: 0x0000000112e40fa5 libjogl_desktop.jnilib`Java_jogamp_opengl_macosx_cgl_CGL_waitUntilNSOpenGLLayerIsReady__JJ + 37
frame #5: 0x00000001022fc738
frame #6: 0x00000001022f0058
frame #7: 0x00000001022f0350
frame #8: 0x00000001022f0706
frame #9: 0x00000001022f0058
Chrix
Newbie
 
Posts: 2
Joined: Wed Apr 09, 2014 2:50 pm

Re: JCEF Mac crashes and CrBrowserMain / AppKit Threads

Postby magreenblatt » Wed Apr 09, 2014 3:40 pm

This is currently under discussion in https://code.google.com/p/javachromiume ... tail?id=53.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 27 guests