Here is the call stack:
- Code: Select all
libcef.dll!base::debug::BreakDebugger() Line 21
libcef.dll!logging::LogMessage::~LogMessage() Line 738
libcef.dll!CefBrowserMainParts::PostMainMessageLoopRun() Line 186
libcef.dll!content::BrowserMainLoop::ShutdownThreadsAndCleanUp() Line 977 + 0x27 bytes
libcef.dll!content::BrowserMainRunnerImpl::Shutdown() Line 212
libcef.dll!CefMainDelegate::ShutdownBrowser() Line 661 + 0x1b bytes
libcef.dll!CefContext::FinalizeShutdown() Line 466
libcef.dll!CefContext::Shutdown() Line 347
libcef.dll!CefShutdown() Line 172
libcef.dll!cef_shutdown() Line 216
>CefEmbed.dll!CefShutdown() Line 204 + 0x8 bytes C++
CefEmbed.dll!CCefEmbedApp::UninitializeCef() Line 74 C++
Here is my is my code to initialise CEF.
- Code: Select all
bool CCefEmbedApp::InitializeCef()
{
if (!m_bCefInitialized)
{
HINSTANCE hInstance = GetModuleHandle(NULL);
CefMainArgs mainArgs(hInstance);
CefSettings settings;
settings.no_sandbox = true;
settings.multi_threaded_message_loop = false;
settings.single_process = true;
CefRefPtr<MyCefApp> cefApp = new MyCefApp();
m_bCefInitialized = CefInitialize(mainArgs, settings, cefApp.get(), NULL);
return m_bCefInitialized;
}
return false;
}
To unitialise CEF I used the following.
- Code: Select all
void CCefEmbedApp::UninitializeCef()
{
if (m_bCefInitialized)
{
m_bCefInitialized = false;
for (int i = 0; i < 10; i++)
{
CefDoMessageLoopWork();
}
CefShutdown();
}
}
I'm running the message loop by having PumpMessage in the main application call a function inside the DLL.
- Code: Select all
void CCefEmbedApp::DoMessageLoopWork()
{
if (m_bCefInitialized)
{
CefDoMessageLoopWork();
}
}
Thanks