CEF Crashing on Monterey

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 Crashing on Monterey

Postby sirheroics » Tue Jan 25, 2022 9:41 pm

Hello all,

We've been using chromium-90.0.4430.212 on Windows/Mac/Linux which has been working fine until Monterey came out on OSX. Now we're getting a crash on CEF_initialize. Backtrace below. It happens on both M1 macs and x86_64. I tried 97.0.4692.99 as well which seems to have the same issue. This seems like it could be relevant to https://bitbucket.org/chromiumembedded/ ... shim-false but that's been resolved and that was a Big Sur issue.

Any ideas?

Code: Select all
* thread #1, name = 'Main Thread', queue = 'com.apple.main-thread', stop reason = EXC_BREAKPOINT (code=1, subcode=0x28d69c7c8)
  * frame #0: 0x000000028d69c7c8 Chromium Embedded Framework`base::allocator::StoreMallocZone(_ChromeMallocZone*) [inlined] base::allocator::StoreZoneFunctions(_ChromeMallocZone const*, base::allocator::MallocZoneFunctions*)::$_0::operator()() const at malloc_zone_functions_mac.cc:27:3 [opt]
    frame #1: 0x000000028d69c7c8 Chromium Embedded Framework`base::allocator::StoreMallocZone(_ChromeMallocZone*) [inlined] base::allocator::StoreZoneFunctions(zone=0x000060000148cb48) at malloc_zone_functions_mac.cc:27:3 [opt]
    frame #2: 0x000000028d69c7c8 Chromium Embedded Framework`base::allocator::StoreMallocZone(zone=0x000060000148cb48) at malloc_zone_functions_mac.cc:86:3 [opt]
    frame #3: 0x000000028d69b848 Chromium Embedded Framework`base::allocator::InitializeDefaultDispatchToMacAllocator() at allocator_interception_mac.mm:356:5 [opt]
    frame #4: 0x000000028d69b7f4 Chromium Embedded Framework`base::allocator::InitializeDefaultDispatchToMacAllocator() at allocator_interception_mac.mm:335:3 [opt]
    frame #5: 0x000000028d6ad004 Chromium Embedded Framework`base::allocator::InitializeAllocatorShim() at allocator_shim.cc:389:3 [opt]
    frame #6: 0x000000028d2ab980 Chromium Embedded Framework`content::ContentMainInitialize(params=0x0000600003bde5c0, content_main_runner=0x0000600000e95260) at content_main.cc:234:5 [opt]
    frame #7: 0x000000028d35bd88 Chromium Embedded Framework`CefMainRunner::Initialize(this=0x0000600003070540, settings=0x0000000141031348, application=(ptr_ = 0x00006000024d9730), args=0x000000016f0f53b0, windows_sandbox_info=<unavailable>, initialized=0x0000000141031340, context_initialized=base::OnceClosure @ 0x000000016f0f5068)>) at main_runner.cc:236:7 [opt]
    frame #8: 0x000000028d33f004 Chromium Embedded Framework`CefContext::Initialize(this=0x0000000141031340, args=0x000000016f0f53b0, settings=<unavailable>, application=(ptr_ = 0x00006000024d9730), windows_sandbox_info=0x0000000000000000) at context.cc:359:24 [opt]
    frame #9: 0x000000028d33ed28 Chromium Embedded Framework`CefInitialize(args=0x000000016f0f53b0, settings=0x000000016f0f51d0, application=(ptr_ = 0x00006000024d9730), windows_sandbox_info=0x0000000000000000) at context.cc:215:21 [opt]
    frame #10: 0x000000028a2225d4 Chromium Embedded Framework`::cef_initialize(args=<unavailable>, settings=<unavailable>, application=0x0000000106fee788, windows_sandbox_info=0x0000000000000000) at libcef_dll.cc:113:7 [opt]
sirheroics
Techie
 
Posts: 32
Joined: Mon Mar 22, 2021 6:32 am

Re: CEF Crashing on Monterey

Postby magreenblatt » Tue Jan 25, 2022 10:39 pm

Does it reproduce with the CEF sample apps? Try an M98 build that includes the fix you linked.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: CEF Crashing on Monterey

Postby sirheroics » Wed Jan 26, 2022 7:58 am

magreenblatt wrote:Does it reproduce with the CEF sample apps? Try an M98 build that includes the fix you linked.


I was unable to reproduce the issue with the 97 sample app. That seems to work fine after running xattr -c on it to clear the security issues around downloading it from the web.

(I also tried xattr -cr on the whole Framework before initializing CEF with our app but 97 still does not work on Monterey though it does work on Big Sur)

M98 DOES work properly however on Monterey.
sirheroics
Techie
 
Posts: 32
Joined: Mon Mar 22, 2021 6:32 am

Re: CEF Crashing on Monterey

Postby magreenblatt » Wed Jan 26, 2022 11:51 am

If your application is calling into any Apple APIs before calling CefInitialize then perhaps the implementation of those APIs have changed, are they're now triggering the bug starting with Monterey. Since it's fixed for you in M98 I suggest using that version or newer.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: CEF Crashing on Monterey

Postby sirheroics » Wed Jan 26, 2022 6:56 pm

magreenblatt wrote:If your application is calling into any Apple APIs before calling CefInitialize then perhaps the implementation of those APIs have changed, are they're now triggering the bug starting with Monterey. Since it's fixed for you in M98 I suggest using that version or newer.


Yes that's exactly the case. For some reason moving the cef_initialize to be BEFORE our FMOD (sound engine) initialization things work properly again even back to version 90.
sirheroics
Techie
 
Posts: 32
Joined: Mon Mar 22, 2021 6:32 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 45 guests