Why this crash? how to avoid? Check failed: content::Browser

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.

Why this crash? how to avoid? Check failed: content::Browser

Postby philip142au » Sat Apr 12, 2014 9:40 pm

Hi there,

Why does this appear?
How can I avoid it?

THanks, Philip

[0413/103815:FATAL:theme_helper_mac.mm(75)] Check failed: content::BrowserThread::CurrentlyOn(content::BrowserThread::UI).
0 Chromium Embedded Framework 0x00000001023aea8f base::debug::StackTrace::StackTrace() + 47
1 Chromium Embedded Framework 0x00000001023aeae3 base::debug::StackTrace::StackTrace() + 35
2 Chromium Embedded Framework 0x0000000102423056 logging::LogMessage::~LogMessage() + 70
3 Chromium Embedded Framework 0x0000000102421e53 logging::LogMessage::~LogMessage() + 35
4 Chromium Embedded Framework 0x0000000102ec16cd +[ScrollbarPrefsObserver notifyPrefsChangedWithRedraw:] + 253
5 Chromium Embedded Framework 0x0000000102ec15ad +[ScrollbarPrefsObserver behaviorPrefsChanged:] + 61
6 CoreFoundation 0x00007fff8291be0c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
7 CoreFoundation 0x00007fff8280fa6d _CFXNotificationPost + 2893
8 Foundation 0x00007fff8c2427ba -[NSNotificationCenter postNotificationName:object:userInfo:] + 68
9 libdispatch.dylib 0x00007fff826f21d7 _dispatch_call_block_and_release + 12
10 libdispatch.dylib 0x00007fff826ef2ad _dispatch_client_callout + 8
11 libdispatch.dylib 0x00007fff826f6f03 _dispatch_main_queue_callback_4CF + 333
12 CoreFoundation 0x00007fff828b4679 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
13 CoreFoundation 0x00007fff8286f954 __CFRunLoopRun + 1636
14 CoreFoundation 0x00007fff8286f0b5 CFRunLoopRunSpecific + 309
15 HIToolbox 0x00007fff8f9d2a0d RunCurrentEventLoopInMode + 226
16 HIToolbox 0x00007fff8f9d27b7 ReceiveNextEventCommon + 479
17 HIToolbox 0x00007fff8f9d25bc _BlockUntilNextEventMatchingListInModeWithFilter + 65
18 AppKit 0x00007fff86c8e3de _DPSNextEvent + 1434
19 AppKit 0x00007fff86c8da2b -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 122
20 AppKit 0x00007fff86c81b2c -[NSApplication run] + 553
21 AppKit 0x00007fff86c6c913 NSApplicationMain + 940
22 SampleBrowser 0x0000000100026f16 main + 166
23 SampleBrowser 0x0000000100006e14 start + 52
philip142au
Techie
 
Posts: 19
Joined: Mon Feb 03, 2014 11:26 pm

Re: Why this crash? how to avoid? Check failed: content::Bro

Postby philip142au » Sat Apr 12, 2014 10:06 pm

Hi there,

I avoided this crash by doing the following.

I was trying to start Cef inside a new thread, this was the mistake. Don't start it inside a thread, start it inside the main application, now I start it like this:

void foo() {
int argc = 0;

char *argv[] = {"nothing", NULL};

CefMainArgs main_args(argc, argv);
CefRefPtr<SimpleApp> app(new SimpleApp);
CefSettings settings;
settings.windowless_rendering_enabled = true;
CefInitialize(main_args, settings, app.get(), NULL);
// Run the CEF message loop. This will block until CefQuitMessageLoop() is
// called.
// CefRunMessageLoop();
// Shut down CEF.
// CefShutdown();
}

You can see previously I was running a message loop inside the thread, CEF didn't like that, hence the bug, CefRunMessageLoop is now commented out.

I'm using Ogre3D, so I placed CefDoMessageLoopWork(); inside the frameRenderingQueued function which gets called frequently.
bool frameRenderingQueued(const Ogre::FrameEvent& evt)
{
CefDoMessageLoopWork();

So that Cef message loop can work.

I think fixed.

Philip
philip142au
Techie
 
Posts: 19
Joined: Mon Feb 03, 2014 11:26 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 112 guests