Shutdown CEF is crashing due to v8 isolate function

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.

Re: Shutdown CEF is crashing due to v8 isolate function

Postby megakev » Mon Feb 04, 2013 6:25 pm

Hi again :D

Thanx for your support, I tested the fix you made, and things seems to go a little further ... but
the shutdown is being stopped by this statement in libcef_dll.cc

Code: Select all
  DCHECK_EQ(CefCookieManagerCppToC::DebugObjCt, 0);


I don't use the global cookie manager of CEF, instead of this I use
Code: Select all

myCookieManager = CefCookieManager::CreateManager("");



where :
Code: Select all

class MyClient : public CefClient, public CefRequestHandler {

//...
CefRefPtr<CefCookieManager> myCookieManager;
//...
//...
CefRefPtr<CefCookieManager> BrowserHandler::GetCookieManager(CefRefPtr<CefBrowser> browser,
     const CefString& main_url) {

   if (!myCookieManager.get()) {
      mCookieManager = CefCookieManager::CreateManager("");
   }
  return mCookieManager;
}
//...



After having spent some time to debug, it seems to me that the refcount of MyClient is never
set to 0, preventing the CookieManage to be freed.
I looked in my code and I don't cache any pointers to MyClient instance, so it's a reference that
only held in CEF, but I do not find where ...

Any ideas on this ?

regards
megakev
Techie
 
Posts: 18
Joined: Tue Nov 27, 2012 5:29 am

Re: Shutdown CEF is crashing due to v8 isolate function

Postby magreenblatt » Mon Feb 04, 2013 9:06 pm

You should release the CefCookieManager reference before calling CefShutdown. For example, in CefLifeSpanHandler::OnBeforeClose.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Shutdown CEF is crashing due to v8 isolate function

Postby megakev » Tue Feb 05, 2013 2:47 am

Excellent !

Seems to work fine.
very big thanks to you


Regards
Kevin
megakev
Techie
 
Posts: 18
Joined: Tue Nov 27, 2012 5:29 am

Previous

Return to Support Forum

Who is online

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