PolesApart wrote:It seems like I'm hitting this from time to time (I use multithreaded message loop).
It seems like that by the time my main application thread exits it's main loop and calls CefShutdown(), cef wasn't done cleaning up after last OnBeforeClose. As I can't interfere with cef's own message loop nor with system thread scheduling, my "solution" was to put a Sleep(300); after my thread exits it's own message loop but before calling CefShutdown(). As windows non-console applications runs in background and the windows are already closed, no one notices the sleep. But there ough to be some better thread synchronization possibility.
magreenblatt wrote:Does the problem reproduce in cefclient when running with --multi-threaded-message-loop?
PolesApart wrote:magreenblatt wrote:Does the problem reproduce in cefclient when running with --multi-threaded-message-loop?
So far I couldn't reproduce it with a custom compiled cefclient.exe (I'm using 3.2526.1347 for this and my application) nor with 3.2526.1366 downloaded from cefbuilds.com
What I noticed is that I can get this:
[0202/182404:WARNING:raw_channel.cc(208)] Shutting down RawChannel with write buffer nonempty
Every time I got the other message (with the failed assertion) on my application (before introducing the sleep), I also got this one before it.
Is there an easy way to find out what's the (native) thread handle/id for cef's own message loop when using multithread message loop? I could WaitForSingleObject() on it instead of sleeping.
digory wrote:I ran into the same problem. I call CefExecuteProcess from WinMain. If the result code is >= 0, I return, and CefShutdown will not be called in that process. Otherwise, I set multi_threaded_message_loop to true and call CefInitialize. After this, WinMain goes into a custom event loop. Both the browser and the application I'm trying to integrate it into seem to work fine. However, when the custom event loop ends, I call CefShutdown, and the result is an assertion telling me I'm calling it from an invalid thread. I also tried CefPostTask (TID_UI, base::Bind (::CefShutdown));, with the same result.
DWORD threadId = ::GetCurrentThreadId();
Users browsing this forum: No registered users and 105 guests