Check failed: 0 == CefBrowserContext::DebugObjCt Mac

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.

Check failed: 0 == CefBrowserContext::DebugObjCt Mac

Postby lbeernaert » Tue Sep 13, 2016 10:35 am

Hey,

I have search the forum and issue boards in search of how to correctly implement the lifecycle handling in CEF.

I have modelled the lifecycle handling based off of the CefSimple App and still this pops up 70% of the time.

All I do is start the application, let the page load and close the window.

I can verify that the the browser object is destroyed and all the delegate handling is in place.

I have made sure that:
    - No references to CefBrowser are kept around
    - Make sure all active requests are cancelled after CefRunMessageLoop() exits. I also call CefDoMessageLoopWork() 10x to make sure any pending actions are taken.
    - I even added the following code on DoClose (take from https://code.google.com/archive/p/chromiumembedded/issues/1203)
    Code: Select all
     NSArray *subviews = [[window contentView] subviews];
            Class cefBrowserHostViewClass = NSClassFromString(@"CefBrowserHostView");
            for (NSView *view in subviews) {
                if ([view isKindOfClass:cefBrowserHostViewClass]) {
                    [view removeFromSuperview];
                    break;
                }
            }



I'm running out of ideas here. Has anyone else had any success with this?
lbeernaert
Techie
 
Posts: 11
Joined: Wed Mar 16, 2016 3:38 am

Re: Check failed: 0 == CefBrowserContext::DebugObjCt Mac

Postby magreenblatt » Tue Sep 13, 2016 12:03 pm

See https://bitbucket.org/chromiumembedded/cef/issues/1954. You can use a Release build of CEF to avoid this debug assertion for the time being.

Note that you should not mix calls to CefRunMessageLoop and CefDoMessageLoopWork.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Check failed: 0 == CefBrowserContext::DebugObjCt Mac

Postby lbeernaert » Wed Sep 14, 2016 2:36 am

I do use a Release Build of CEF. I just assumed that since I don't see this on windows in debug builds, that it must be a problem with my Mac setup when running in Debug mode.

I'll remove the CefDoMessageLoopWork.

Thanks.
lbeernaert
Techie
 
Posts: 11
Joined: Wed Mar 16, 2016 3:38 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 95 guests