CefShutdown crashes when using external message loop

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.

CefShutdown crashes when using external message loop

Postby Serhii » Thu Jan 14, 2021 6:24 am

I am integrating Chromium Embedded Browser into the existing windows application. I am using external hosting application and in OnTimer event I am running CefDoMessageLoopWork(). Actually all browsers are loaded appropriately. But application crashes aiming to run CefShutdown(). I am closing browsers with call _browser->GetHost()->CloseBrowser(true);

What can be possible reasons of CefShutdown failing?
Serhii
Newbie
 
Posts: 2
Joined: Thu Jan 14, 2021 6:10 am

Re: CefShutdown crashes when using external message loop

Postby magreenblatt » Thu Jan 14, 2021 11:51 am

You need to wait for OnBeforeClose callbacks from all browsers and then call CefDoMessageLoopWork a few more times to empty the message queue before calling CefShutdown. See also the many related threads on this forum.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 209 guests