Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-67865

crashes in ResourceContextQt

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.12.0
    • 5.11
    • WebEngine
    • None
    • af313cb881610fedb04c9d486597462e6b3c8e12

      This is quoted from excellent Juri's investigation: https://codereview.qt-project.org/#/c/222780/
      and created for book keeping.

      Copyrights belong to Juri.

      "Current pointers:

      • BrowserContextQt has an owning pointer to ResourceContextQt.
      • ResourceContextQt has a non-owning pointer to BrowserContextQt.
      • ResourceRequestInfoImpl has a non-owning pointer to ResourceContextQt.

      Current shutdown behavior:

      1. (UI thread) BrowserContextAdapter::~BrowserContextAdapter calls
      BrowserContextQt::~BrowserContextQt, which posts a task to the IO thread to
      delete the ResourceContextQt. The BrowserContextQt and BrowserContextAdapter
      objects are deleted.

      2. (IO thread) ResourceContextQt::~ResourceContextQt runs and calls
      ResourceDispatcherHostImpl::CancelRequestsForContext. The ResourceContextQt
      object is deleted.

      Between steps 1 and 2 the ResourceContextQt object will have a pointer to the
      already-deleted BrowserContextQt. Since the requests are only canceled in step 2
      then the ResourceDispatcherHostImpl may try to use a ResourceRequestInfoImpl
      object, which will try to use the ResourceContextQt object, which will try to
      use the already deleted BrowserContextQt object. And then we crash.
      "

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt_webengine_team Qt WebEngine Team
            michal Michal Klocek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes