Cef Mac app crashing on terminate.

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.

Cef Mac app crashing on terminate.

Postby dmodi » Fri Jan 24, 2020 6:46 am

Hi,

I am building a CEF app on MacOS. The app is working fine except when I try to terminate the app it crashes. Can I get any pointers?
dmodi
Newbie
 
Posts: 5
Joined: Thu Jan 16, 2020 12:26 am

Re: Cef Mac app crashing on terminate.

Postby magreenblatt » Fri Jan 24, 2020 9:27 am

What macOS, Xcode and CEF version? What is the symbolized call stack of the crash? Does it reproduce with the CEF sample apps?
magreenblatt
Site Admin
 
Posts: 10660
Joined: Fri May 29, 2009 6:57 pm

Re: Cef Mac app crashing on terminate.

Postby zakalwe » Fri Jan 24, 2020 3:02 pm

I am also seeing this and it is easy to reproduce with 79.1.31+gfc9ef34+chromium-79.0.3945.117_macosx64

Xcode version is:

Version 11.1 (11A1027)

Repro steps:

build and run cefclient
open a pop-up window or devtools
quit the app (doesn't seem to matter if you close the pop-up or not first).

Result:
EXC_BAD_ACCESS on shutdown

Debugger points to this source:
libcef_dll_dylib.cc(986):

NO_SANITIZE("cfi-icall") void cef_run_message_loop() {
g_libcef_pointers.cef_run_message_loop(); <-- CrBrowserMain (1): EXC_BAD_ACCESS (code=1, address=0x3eaddd4e0d20)
}

* thread #1, name = 'CrBrowserMain', queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x3eaddd4e0d20)
frame #0: 0x00007fff6587864c libobjc.A.dylib`objc_release + 28
frame #1: 0x00007fff6587947c libobjc.A.dylib`(anonymous namespace)::AutoreleasePoolPage::pop(void*) + 710
frame #2: 0x00007fff3b09ed9a CoreFoundation`_CFAutoreleasePoolPop + 22
frame #3: 0x00007fff3d34a762 Foundation`-[NSAutoreleasePool drain] + 144
frame #4: 0x0000000109579bd3 Chromium Embedded Framework`___lldb_unnamed_symbol192213$$Chromium Embedded Framework + 163
frame #5: 0x000000010956916a Chromium Embedded Framework`___lldb_unnamed_symbol191816$$Chromium Embedded Framework + 10
frame #6: 0x00000001095794cf Chromium Embedded Framework`___lldb_unnamed_symbol192200$$Chromium Embedded Framework + 63
frame #7: 0x00007fff3b0e8e33 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
frame #8: 0x00007fff3b0e8dd9 CoreFoundation`__CFRunLoopDoSource0 + 108
frame #9: 0x00007fff3b0cc79b CoreFoundation`__CFRunLoopDoSources0 + 195
frame #10: 0x00007fff3b0cbd65 CoreFoundation`__CFRunLoopRun + 1189
frame #11: 0x00007fff3b0cb66e CoreFoundation`CFRunLoopRunSpecific + 455
frame #12: 0x00007fff3a32a1ab HIToolbox`RunCurrentEventLoopInMode + 292
frame #13: 0x00007fff3a329ee5 HIToolbox`ReceiveNextEventCommon + 603
frame #14: 0x00007fff3a329c76 HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 64
frame #15: 0x00007fff386c177d AppKit`_DPSNextEvent + 1135
frame #16: 0x00007fff386c046b AppKit`-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1361
frame #17: 0x00007fff386ba588 AppKit`-[NSApplication run] + 699
frame #18: 0x000000010957a74c Chromium Embedded Framework`___lldb_unnamed_symbol192235$$Chromium Embedded Framework + 300
frame #19: 0x0000000109578e98 Chromium Embedded Framework`___lldb_unnamed_symbol192192$$Chromium Embedded Framework + 136
frame #20: 0x00000001095e9937 Chromium Embedded Framework`___lldb_unnamed_symbol194136$$Chromium Embedded Framework + 263
frame #21: 0x00000001095a8538 Chromium Embedded Framework`___lldb_unnamed_symbol193073$$Chromium Embedded Framework + 728
frame #22: 0x000000010925ff06 Chromium Embedded Framework`___lldb_unnamed_symbol180636$$Chromium Embedded Framework + 198
* frame #23: 0x00000001002496ea cefclient`::cef_run_message_loop() at libcef_dll_dylib.cc:987:3
frame #24: 0x000000010024c039 cefclient`CefRunMessageLoop() at libcef_dll_wrapper.cc:134:3
frame #25: 0x00000001000ce2a1 cefclient`client::MainMessageLoopStd::Run(this=0x0000600000004430) at main_message_loop_std.cc:14:3
frame #26: 0x00000001000c012c cefclient`client::(anonymous namespace)::RunMain(argc=1, argv=0x00007ffeefbff080) at cefclient_mac.mm:416:28
frame #27: 0x00000001000bfac2 cefclient`main(argc=1, argv=0x00007ffeefbff080) at cefclient_mac.mm:438:10
frame #28: 0x00007fff670533d5 libdyld.dylib`start + 1
zakalwe
Newbie
 
Posts: 7
Joined: Thu Jan 23, 2020 3:49 pm

Re: Cef Mac app crashing on terminate.

Postby Czarek » Fri Jan 24, 2020 4:46 pm

What exactly are you doing when you say "I try to terminate"?
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. Connect with me on LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1904
Joined: Sun Nov 06, 2011 2:12 am

Re: Cef Mac app crashing on terminate.

Postby noMrnnnthr » Fri Apr 03, 2020 10:27 am

zakalwe wrote:I am also seeing this and it is easy to reproduce with 79.1.31+gfc9ef34+chromium-79.0.3945.117_macosx64

Xcode version is:

Version 11.1 (11A1027)

Repro steps:

build and run cefclient
open a pop-up window or devtools
quit the app (doesn't seem to matter if you close the pop-up or not first).

Result:
EXC_BAD_ACCESS on shutdown

Debugger points to this source:
libcef_dll_dylib.cc(986):

NO_SANITIZE("cfi-icall") void cef_run_message_loop() {
g_libcef_pointers.cef_run_message_loop(); <-- CrBrowserMain (1): EXC_BAD_ACCESS (code=1, address=0x3eaddd4e0d20)
}

* thread #1, name = 'CrBrowserMain', queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x3eaddd4e0d20)
frame #0: 0x00007fff6587864c libobjc.A.dylib`objc_release + 28
frame #1: 0x00007fff6587947c libobjc.A.dylib`(anonymous namespace)::AutoreleasePoolPage::pop(void*) + 710
frame #2: 0x00007fff3b09ed9a CoreFoundation`_CFAutoreleasePoolPop + 22
frame #3: 0x00007fff3d34a762 Foundation`-[NSAutoreleasePool drain] + 144
frame #4: 0x0000000109579bd3 Chromium Embedded Framework`___lldb_unnamed_symbol192213$$Chromium Embedded Framework + 163
frame #5: 0x000000010956916a Chromium Embedded Framework`___lldb_unnamed_symbol191816$$Chromium Embedded Framework + 10
frame #6: 0x00000001095794cf Chromium Embedded Framework`___lldb_unnamed_symbol192200$$Chromium Embedded Framework + 63
frame #7: 0x00007fff3b0e8e33 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
frame #8: 0x00007fff3b0e8dd9 CoreFoundation`__CFRunLoopDoSource0 + 108
frame #9: 0x00007fff3b0cc79b CoreFoundation`__CFRunLoopDoSources0 + 195
frame #10: 0x00007fff3b0cbd65 CoreFoundation`__CFRunLoopRun + 1189
frame #11: 0x00007fff3b0cb66e CoreFoundation`CFRunLoopRunSpecific + 455
frame #12: 0x00007fff3a32a1ab HIToolbox`RunCurrentEventLoopInMode + 292
frame #13: 0x00007fff3a329ee5 HIToolbox`ReceiveNextEventCommon + 603
frame #14: 0x00007fff3a329c76 HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 64
frame #15: 0x00007fff386c177d AppKit`_DPSNextEvent + 1135
frame #16: 0x00007fff386c046b AppKit`-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1361
frame #17: 0x00007fff386ba588 AppKit`-[NSApplication run] + 699
frame #18: 0x000000010957a74c Chromium Embedded Framework`___lldb_unnamed_symbol192235$$Chromium Embedded Framework + 300
frame #19: 0x0000000109578e98 Chromium Embedded Framework`___lldb_unnamed_symbol192192$$Chromium Embedded Framework + 136
frame #20: 0x00000001095e9937 Chromium Embedded Framework`___lldb_unnamed_symbol194136$$Chromium Embedded Framework + 263
frame #21: 0x00000001095a8538 Chromium Embedded Framework`___lldb_unnamed_symbol193073$$Chromium Embedded Framework + 728
frame #22: 0x000000010925ff06 Chromium Embedded Framework`___lldb_unnamed_symbol180636$$Chromium Embedded Framework + 198
* frame #23: 0x00000001002496ea cefclient`::cef_run_message_loop() at libcef_dll_dylib.cc:987:3
frame #24: 0x000000010024c039 cefclient`CefRunMessageLoop() at libcef_dll_wrapper.cc:134:3
frame #25: 0x00000001000ce2a1 cefclient`client::MainMessageLoopStd::Run(this=0x0000600000004430) at main_message_loop_std.cc:14:3
frame #26: 0x00000001000c012c cefclient`client::(anonymous namespace)::RunMain(argc=1, argv=0x00007ffeefbff080) at cefclient_mac.mm:416:28
frame #27: 0x00000001000bfac2 cefclient`main(argc=1, argv=0x00007ffeefbff080) at cefclient_mac.mm:438:10
frame #28: 0x00007fff670533d5 libdyld.dylib`start + 1


Have you resloved it yet? I'm facing the same problem :cry:
noMrnnnthr
Newbie
 
Posts: 3
Joined: Thu Apr 02, 2020 12:13 pm

Re: Cef Mac app crashing on terminate.

Postby magreenblatt » Fri Apr 03, 2020 1:10 pm

Please add a bug report.
magreenblatt
Site Admin
 
Posts: 10660
Joined: Fri May 29, 2009 6:57 pm

Re: Cef Mac app crashing on terminate.

Postby smayoral » Wed Sep 30, 2020 3:35 pm

also having this problem with same CEF version and XCODE 12.0.1. Any news?

CefSimple example has a similar problem. It crashes after some open/close of PopUp Windows.

In
#0 0x00007fff6bd8e678 in objc_release ()

I see two consecutive calls to SimpleHandler::DoClose callback with same CefRefPtr<CefBrowser> browser pointer.
smayoral
Techie
 
Posts: 21
Joined: Wed Jan 10, 2018 8:58 am

Re: Cef Mac app crashing on terminate.

Postby magreenblatt » Wed Sep 30, 2020 3:40 pm

smayoral wrote:also having this problem with same CEF version and XCODE 12.0.1. Any news?

CefSimple example has a similar problem. It crashes after some open/close of PopUp Windows.

In
#0 0x00007fff6bd8e678 in objc_release ()

I see two consecutive calls to SimpleHandler::DoClose callback with same CefRefPtr<CefBrowser> browser pointer.

Let’s keep the conversation in your thread at viewtopic.php?f=6&t=17887
magreenblatt
Site Admin
 
Posts: 10660
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 6 guests