Skip to content

Crash on exit when closing app immediately during initial loading #2 #455

Description

@cztomczak

This is a different issue from #454. This is not a Python exception, but a crash in CPython. It is hard to reproduce. Earlier I've reproduced it multiple times when loading Google website, but now I can't. I'm also trying with https://cnn.com/ (which has a lot of frames and content), but also no luck at the moment.

During the crash the last log messages were (CefShutdown not called):

[0817/175818.046:INFO:cef_log.cpp(8)] [Browser process] V8ContextHandler_OnContextCreated()

[0817/175818.124:INFO:cef_log.cpp(8)] [Browser process] LifespanHandler_OnBeforeClose

[0817/175818.124:INFO:cef_log.cpp(8)] [Browser process] del g_pyFrames[1#2]

[0817/175818.125:INFO:cef_log.cpp(8)] [Browser process] del g_pyBrowsers[1]

[0817/175818.128:INFO:cef_log.cpp(8)] [Browser process] GetResourceHandler: Browser was already globally unref
erenced, a new incomplete instance is created, browser id=1

When debugging issues with cookies not flushed to disk (#365), I noticed that after browser is closed there are still a few callbacks being executed from CefRequestHandler: GetResourceHandler, GetCookieManager and OnBeforeResourceLoad. I have an idea to check if browser is already closed and in such case do not execute any code in these callbacks. Check with such code:

        if browserId in g_unreferenced_browsers \
            or browserId in g_closed_browsers:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions