Crash during shutdown (cmd+q)

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.

Crash during shutdown (cmd+q)

Postby daka1 » Sat Mar 21, 2015 5:24 am

Hello, I am experiencing some crashed during shutdown using 2295.2021 on OSX.
I can reproducit by loading a webpage and pressing cmd+q (does not happen every time).

I have cache and load web-files locally. (I have not tried on the release version yet).
Have anybody had a similar experience?



Code: Select all
void RootWindowManager::CloseAllWindows(bool force) {
  if (!CURRENTLY_ON_MAIN_THREAD()) {
    // Execute this method on the main thread.
    MAIN_POST_CLOSURE(
        base::Bind(&RootWindowManager::CloseAllWindows, base::Unretained(this),
                  force));
    return;
  }

  if (root_windows_.empty())
    return;

  RootWindowSet::const_iterator it = root_windows_.begin();
  for (; it != root_windows_.end(); ++it)
    (*it)->Close(force);   //<-------CRASH HERE
}



#0 0x0000000000000000 in 0x00000000 ()
#1 0x0000000100039caa in client::RootWindowManager::CloseAllWindows(bool) at /Users/daka/web-client-cef/cefclient/browser/root_window_manager.cc:94
#2 0x000000010004b965 in -[ClientAppDelegate tryToTerminateApplication:] at /Users/daka/web-client-cef/cefclient/cefclient_mac.mm:337
#3 0x000000010004a184 in -[ClientApplication terminate:] at /Users/daka/web-client-cef/cefclient/cefclient_mac.mm:109
#4 0x00007fff9279d260 in -[NSApplication sendAction:to:from:] ()
#5 0x00007fff927b81c8 in -[NSMenuItem _corePerformAction] ()
#6 0x00007fff927b7f04 in -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] ()
#7 0x00007fff927b707c in -[NSMenu performKeyEquivalent:] ()
#8 0x00007fff927b38e1 in -[NSApplication _handleKeyEquivalent:] ()
#9 0x00007fff92722acc in -[NSApplication sendEvent:] ()
#10 0x000000010004a0ff in -[ClientApplication sendEvent:] at /Users/daka/web-client-cef/cefclient/cefclient_mac.mm:66
#11 0x00007fff925729f9 in -[NSApplication run] ()
#12 0x00000001006b8f31 in base::MessagePumpNSApplication::DoRun(base::MessagePump::Delegate*) ()
#13 0x00000001006b7bd0 in base::MessagePumpCFRunLoopBase::Run(base::MessagePump::Delegate*) ()
#14 0x000000010076ec29 in base::MessageLoop::RunHandler() ()
#15 0x00000001007cef95 in base::RunLoop::Run() ()
#16 0x000000010076e19f in base::MessageLoop::Run() ()
#17 0x000000010047a786 in CefBrowserMessageLoop::RunMessageLoop() ()
#18 0x000000010049e115 in CefRunMessageLoop() ()
#19 0x0000000100354f7b in cef_run_message_loop ()
#20 0x00000001000e0cb9 in CefRunMessageLoop() at /Users/daka/web-client-cef/libcef_dll/wrapper/libcef_dll_wrapper.cc:282
#21 0x000000010002efe1 in client::MainMessageLoopStd::Run() at /Users/daka/web-client-cef/cefclient/browser/main_message_loop_std.cc:15
#22 0x000000010004c35d in client::(anonymous namespace)::RunMain(int, char**) at /Users/daka/web-client-cef/cefclient/cefclient_mac.mm:460
#23 0x000000010004be22 in main at /Users/daka/web-client-cef/cefclient/cefclient_mac.mm:481
#24 0x0000000100004914 in start ()
daka1
Techie
 
Posts: 42
Joined: Fri Feb 20, 2015 4:49 am

Re: Crash during shutdown (cmd+q)

Postby magreenblatt » Mon Mar 23, 2015 10:13 am

magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Crash during shutdown (cmd+q)

Postby daka1 » Thu Mar 26, 2015 3:16 pm

I think that I managed to freak out the reference count of the browser object, since I allowed multiple threads to instantiate a class were it was used.
Switching to release branch and limiting the access to the class instantiation to "once" solved it i think.

The crash seems to have something to do with problems to release browser in the shutdown sequence.
Is it a bug that this cause a crash or would we desire that?

:roll:
daka1
Techie
 
Posts: 42
Joined: Fri Feb 20, 2015 4:49 am

Re: Crash during shutdown (cmd+q)

Postby magreenblatt » Thu Mar 26, 2015 4:43 pm

I'm not able to reproduce the crash with an unchanged trunk build of cefclient on OS X 10.9 so I would guess it has something to do with your changes.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

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

cron