cef3, single-process mode, cleaning up at the wrong time?

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.

cef3, single-process mode, cleaning up at the wrong time?

Postby edwinyzh » Sun Sep 23, 2012 10:52 pm

Hi Marshall,

I'm using cef3 in single-process mode (for some good reasons), I found that if my program end all existing browser instances, then all newly created browser instances will stop working - no websites or strings can be loaded anymore.

So I suspect when a cef3 instance is being destroyed, it checks if there is still any other live browser instance, if no, it wrongly does some cleanup that's not supposed to be doing unless the entire program is shutting down?

I'm using the Delphi wrapper of cef3 and the developer confirms the Delphi wrapper doesn't do any cleanup and he guess the problem is coming from cef3, so I'm asking for help here. The original discussion.

cef3 is really great and this is the only main problem I'm experiencing.
edwinyzh
Techie
 
Posts: 20
Joined: Wed Oct 26, 2011 1:26 am

Re: cef3, single-process mode, cleaning up at the wrong time

Postby magreenblatt » Mon Sep 24, 2012 9:35 am

Single process mode is intended as a development/debugging tool and is not recommended for production use. There are many potential bugs and stability issues related to use of single process mode. You should strongly consider making your application work in multi process mode.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: cef3, single-process mode, cleaning up at the wrong time

Postby edwinyzh » Mon Sep 24, 2012 10:02 am

magreenblatt wrote:Single process mode is intended as a development/debugging tool and is not recommended for production use. There are many potential bugs and stability issues related to use of single process mode. You should strongly consider making your application work in multi process mode.


Sad to hear that... Actually I want to use cef3 in single-process mode, because my app exposes a wide variety of objects to the JavaScript environment, and in single-process mode things are much easier, because in multi-process mode "object A in process A" cannot directly access "object B in process B"...
edwinyzh
Techie
 
Posts: 20
Joined: Wed Oct 26, 2011 1:26 am

Re: cef3, single-process mode, cleaning up at the wrong time

Postby Czarek » Mon Sep 24, 2012 10:11 am

A "hacky" solution would be to create a hidden browser window that does not load anything, just exists for the whole time application being.
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

Re: cef3, single-process mode, cleaning up at the wrong time

Postby Czarek » Mon Sep 24, 2012 10:12 am

magreenblatt wrote:...There are many potential bugs and stability issues related to use of single process mode...

And there is no plan to fix them in the future? The only proper way is to go multi-process mode?
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

Re: cef3, single-process mode, cleaning up at the wrong time

Postby magreenblatt » Mon Sep 24, 2012 10:13 am

edwinyzh wrote:
magreenblatt wrote:Single process mode is intended as a development/debugging tool and is not recommended for production use. There are many potential bugs and stability issues related to use of single process mode. You should strongly consider making your application work in multi process mode.


Sad to hear that... Actually I want to use cef3 in single-process mode, because my app exposes a wide variety of objects to the JavaScript environment, and in single-process mode things are much easier, because in multi-process mode "object A in process A" cannot directly access "object B in process B"...

In this case you might consider using CEF1 which is a stable single-process implementation.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: cef3, single-process mode, cleaning up at the wrong time

Postby magreenblatt » Mon Sep 24, 2012 10:15 am

Czarek wrote:
magreenblatt wrote:...There are many potential bugs and stability issues related to use of single process mode...

And there is no plan to fix them in the future? The only proper way is to go multi-process mode?

Most of the stability issues are in Chromium code, and the single-process code path gets very little real world usage and testing currently. Any issues will likely be fixed in the future (Chromium for mobile devices needs a stable single-process mode) but the timeline is undefined.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: cef3, single-process mode, cleaning up at the wrong time

Postby edwinyzh » Mon Sep 24, 2012 10:19 am

magreenblatt wrote:
edwinyzh wrote:
magreenblatt wrote:Single process mode is intended as a development/debugging tool and is not recommended for production use. There are many potential bugs and stability issues related to use of single process mode. You should strongly consider making your application work in multi process mode.


Sad to hear that... Actually I want to use cef3 in single-process mode, because my app exposes a wide variety of objects to the JavaScript environment, and in single-process mode things are much easier, because in multi-process mode "object A in process A" cannot directly access "object B in process B"...

In this case you might consider using CEF1 which is a stable single-process implementation.


Yes, I was using cef1 and it's very stable, but I thought cef3 is the new cef and cef1 is (or will be) out of date. So here are you suggesting that cef1 will be kept updating like cef3 in the future?
edwinyzh
Techie
 
Posts: 20
Joined: Wed Oct 26, 2011 1:26 am

Re: cef3, single-process mode, cleaning up at the wrong time

Postby fddima » Mon Sep 24, 2012 10:20 am

magreenblatt wrote:Most of the stability issues are in Chromium code, and the single-process code path gets very little real world usage and testing currently. Any issues will likely be fixed in the future (Chromium for mobile devices needs a stable single-process mode) but the timeline is undefined.

In other side - chrome for android already published - it is really still buggy even on android, but have chances to fixed more quickly, than last year. :)
fddima
Master
 
Posts: 788
Joined: Tue Dec 07, 2010 6:10 am

Re: cef3, single-process mode, cleaning up at the wrong time

Postby magreenblatt » Mon Sep 24, 2012 10:32 am

edwinyzh wrote:Yes, I was using cef1 and it's very stable, but I thought cef3 is the new cef and cef1 is (or will be) out of date. So here are you suggesting that cef1 will be kept updating like cef3 in the future?

There are no plans currently to end support for CEF1. If you want stable single-process mode at this time it is better to use CEF1 instead of CEF3. You may eventually want to port your application to CEF3 multi-process mode in order to take advantage of the stability, security, performance and feature improvements.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Next

Return to Support Forum

Who is online

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

cron