CEF crash on mac

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 crash on mac

Postby NickChapman » Tue Jul 18, 2023 7:28 am

Hi,
The following check is failing on Mac:
Code: Select all
CHECK_LE(i, capacity_);
in VectorBuffer.

This happens pretty soon after CEF is initialised.

Call stack:

Code: Select all
#0   0x000000036b6343fc in base::ImmediateCrash() [inlined] at /Users/nicholaschapman/cef_download/chromium/src/base/immediate_crash.h:146
#1   0x000000036b6343fc in logging::CheckFailure() [inlined] at /Users/nicholaschapman/cef_download/chromium/src/base/check.h:193
#2   0x000000036b6343fc in base::internal::VectorBuffer<absl::optional<base::MessagePump::Delegate::ScopedDoWorkItem> >::operator[](unsigned long) [inlined] at /Users/nicholaschapman/cef_download/chromium/src/base/containers/vector_buffer.h:84
#3   0x000000036b6343fc in base::circular_deque<absl::optional<base::MessagePump::Delegate::ScopedDoWorkItem> >::pop_back() [inlined] at /Users/nicholaschapman/cef_download/chromium/src/base/containers/circular_deque.h:897
#4   0x000000036b6343fc in std::__Cr::stack<absl::optional<base::MessagePump::Delegate::ScopedDoWorkItem>, base::circular_deque<absl::optional<base::MessagePump::Delegate::ScopedDoWorkItem> > >::pop() [inlined] at /Users/nicholaschapman/cef_download/chromium/src/buildtools/third_party/libc++/trunk/include/stack:248
#5   0x000000036b6343fc in base::MessagePumpCFRunLoopBase::PopWorkItemScope() [inlined] at /Users/nicholaschapman/cef_download/chromium/src/base/message_loop/message_pump_mac.mm:380
#6   0x000000036b6343fc in base::MessagePumpCFRunLoopBase::EnterExitObserver(__CFRunLoopObserver*, unsigned long, void*) at /Users/nicholaschapman/cef_download/chromium/src/base/message_loop/message_pump_mac.mm:630
#7   0x00000001ab9699f0 in __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ ()
#8   0x00000001ab9698dc in __CFRunLoopDoObservers ()
#9   0x00000001ab968514 in CFRunLoopRunSpecific ()
#10   0x00000001b51b2c40 in RunCurrentEventLoopInMode ()
#11   0x00000001b51b2a7c in ReceiveNextEventCommon ()
#12   0x00000001b51b27d4 in _BlockUntilNextEventMatchingListInModeWithFilter ()
#13   0x00000001aeb89d44 in _DPSNextEvent ()
#14   0x00000001aeb88ee0 in -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] ()
#15   0x00000001aeb7d344 in -[NSApplication run] ()
#16   0x0000000108f16534 in ___lldb_unnamed_symbol2801 ()
#17   0x0000000107dfa2bc in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
#18   0x0000000107dfe33c in QCoreApplication::exec() ()
#19   0x00000001045c732c in main at /Users/nicholaschapman/programming/substrata/gui_client/MainWindow.cpp:13756
#20   0x00000001ab533f28 in start ()


This is on a MacBook Air, CEF branch 5845.

Any ideas?
NickChapman
Techie
 
Posts: 21
Joined: Sun Apr 24, 2022 2:42 am

Re: CEF crash on mac

Postby NickChapman » Thu Jul 27, 2023 6:15 pm

It looks like this may be the same issue as in viewtopic.php?f=6&t=19269

In particular I need to implement the CefAppProtocol interface when using an external message loop.

@magreenblatt: Is there some example code to do so? I'm not an objective-C expert so the code at https://github.com/chromiumembedded/jav ... mac.mm#L70 is quite hard to follow.

Also, since this seems to be a requirement for using CEF on Mac without crashing, shouldn't it be documented somewhere, for example in https://bitbucket.org/chromiumembedded/ ... alUsage.md?
NickChapman
Techie
 
Posts: 21
Joined: Sun Apr 24, 2022 2:42 am

Re: CEF crash on mac

Postby NickChapman » Thu Jul 27, 2023 7:32 pm

Ok, implemented CefAppProtocol (I think, methods are being called on it at least), and it didn't help. Still getting same crash.
NickChapman
Techie
 
Posts: 21
Joined: Sun Apr 24, 2022 2:42 am

Re: CEF crash on mac

Postby NickChapman » Mon Jul 31, 2023 7:00 pm

Any ideas on this? This crash is blocking the release of our software targeting M1/M2 macs.
NickChapman
Techie
 
Posts: 21
Joined: Sun Apr 24, 2022 2:42 am


Return to Support Forum

Who is online

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