Page 1 of 1

debug crash on CefShutdown with multi_threaded_message_loop

PostPosted: Mon Dec 21, 2015 10:44 am
by jjacobson
I haven't been able to find the source of a crash we've been having in Debug in both 2454 and 2526 branches.

The app crashes with the call to CefShutdown();

> libcef.dll!base::debug::BreakDebugger() Line 21 C++
libcef.dll!logging::LogMessage::~LogMessage() Line 604 C++
libcef.dll!CefBrowserMainParts::PostMainMessageLoopRun() Line 189 C++
libcef.dll!content::BrowserMainLoop::ShutdownThreadsAndCleanUp() Line 946 C++
libcef.dll!content::BrowserMainRunnerImpl::Shutdown() Line 293 C++
libcef.dll!`anonymous namespace'::CefUIThread::CleanUp() Line 291 C++
libcef.dll!base::Thread::ThreadMain() Line 259 C++
libcef.dll!base::`anonymous namespace'::ThreadFunc(void * params) Line 82 C++
[External Code]
[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]

It's only happening in Debug mode. has anyone else seen anything like this or could point me in a certain direction?

I was hoping it was related to http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=12089
but I now have the 2526.1361 integrated and still see the issue. also note, my stacktrace is not the same as what the sample app was generating.
I am adding the "disable-extensions" flag to the command line arguments.

its an MFC MDI application with a single browser window opening.
Running VS2013
The crash does not occur in Release mode. It also runs fine in Debug if settings.single_process = true; however, numerous threads on here stress that single_process mode should not be used for production.

Re: debug crash on CefShutdown with multi_threaded_message_l

PostPosted: Tue Dec 29, 2015 12:46 pm
by magreenblatt
You're likely hitting this DCHECK: https://bitbucket.org/chromiumembedded/ ... ain.cc-185

If you move past that DCHECK using a debugger are you hitting any other DCHECKs during shutdown? You need to make sure that all CefRequestContext and related object references are released before calling CefShutdown.