Lingering Processes

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.

Lingering Processes

Postby BinaryDiff » Sat Jun 27, 2015 7:46 am

This is about 2 closely related but different issues with Chromium so I'm putting them in a same thread, because they could have the same solution.

1)

This has been happening with any build of the branch 2357. I cannot use an earlier branch because I need features of Chromium 43. Sometimes after my application is closed lingering browser processes remain. This is very annoying because it makes my exe non-writable and it means users cannot update the application until they go into the task manager and destroy them.

This is what I'm doing.

I'm using offscreen rendering with default settings (except disabling plugins in case that might be the problem).

I'm updating CEF with CefDoMessageLoopWork();

Then on application exit I call host->CloseBrowser(true); on all the hosts (also tried false, same problem). Then I call CefShutDown().

What more do I need to do so that CefShutDown actually closes all the processes? I've checked all the documentation available but I'm probably missing something.

2)

The second problem is that when the application crashes, the browser processes aren't destroyed either. I think all the browser processes should be destroyed automatically if the application dies, ¿is there any way to achieve this? I've seen replies in this forum regarding this issue to the effect that the application should not crash, but this is not an acceptable answer, since applications are gonna crash, and by forcing the user to kill processes manually you are making what already is annoying event into something even more annoying. I know this is possible because Awesomium kills any processes on crash, unfortunately Awesomium uses an ancient version of Chromium and is not usable for us. Any ideas how to achieve this?
BinaryDiff
Techie
 
Posts: 12
Joined: Sun Dec 28, 2014 9:54 pm

Re: Lingering Processes

Postby Czarek » Sat Jun 27, 2015 10:41 am

Regarding question 1: make sure you are releasing all CEF references before calling CefShutdown. From what I know calling CloseBrowser() is for browsers that were created implicitilly. If the window that embeds the CEF browser was created explicitilly then destroying the outer window is enough for the browser to close.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 103 guests