by rdh » Tue Jul 07, 2020 9:53 am
I grabbed the symbols. I set an action based breakpoint in my client handler's OnAfterCreated method and wrote out the input browser pointer. Here is the call stack when I crash:
libcef.dll!logging::LogMessage::~LogMessage() Line 953 C++
libcef.dll!cef_log(const char * file, int line, int severity, const char * message=0x00000000445828f0) Line 335 C++
> jengined.dll!cef::logging::LogMessage::~LogMessage() Line 186 C++
jengined.dll!shutdown_checker::AssertNotShutdown() Line 54 C++
jengined.dll!`anonymous namespace'::life_span_handler_on_before_close(_cef_life_span_handler_t * self=0x000000001b9a73c0, _cef_browser_t * browser=0x0000000088feb770) Line 198 C++
libcef.dll!CefAudioHandlerCToCpp::OnAudioStreamStopped(scoped_refptr<CefBrowser> browser={...}) Line 113 C++
libcef.dll!CefBrowserHostImpl::DestroyBrowser() Line 1583 C++
libcef.dll!CefBrowserInfoManager::DestroyAllBrowsers() Line 352 C++
libcef.dll!CefContext::FinishShutdownOnUIThread(base::WaitableEvent * uithread_shutdown_event=0x0000000000dfdb50) Line 680 C++
Note the life_span_handler_on_before_close shows me the browser pointer is 0x88feb770. Meanwhile in the output window the action breakpoints show this:
ClientHandler browser is {ptr_=0x000000000ede3940 {...} }
ClientHandler browser is {ptr_=0x000000000ede36c0 {...} }
ClientHandler browser is {ptr_=0x000000001b79f050 {...} }
I have three windows in my app hosting CEF and none of the browsers passed to me match the one on the call stack. So, I still have not determined why cef is randomely crashing my process during shutdown.
Edit update ...
I changed the output to use the result of GetIdentifier after noticing that the input pointer to the methods is of type CefBrowserToCpp. I'm thinking the wrapper stuff is hiding the "real" browser pointer from me making comparing the pointers passed into the methods and the one on the call stack when I crash useless. Now I see that in the current crash, I have IDs of 1, 2 and 3. DoClose is called for 1 and 2 but not 3. And, OnBeforeClose is only called for 3. So, what would be useful in the cef output is the actual browser ID. Something like "Object reference incorrectly held at CefShutdown for browser ID 1"
Last edited by
rdh on Tue Jul 07, 2020 10:20 am, edited 1 time in total.