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

Dangling pointer problems with QWebEngineUrlRequestInterceptor

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.9.0 Beta 4
    • 5.9, 5.10
    • WebEngine
    • None
    • Linux Mint 18.1

    Description

      I have run into crashes because of dangling pointers when I used the same QWebEngineUrlRequestInterceptor for multiple pages and made one of them the parent of the interceptor: when I closed the parent page, the interceptor gets deleted and then the next navigation of the other one crashes.

      This is probably the same issue that causes QTBUG-59876 and I have run into another crash when closing a page that has a QWebEngineUrlRequestInterceptor - after visiting youtube.com in --single-process mode as in QTBUG-60225. See the attached example.

      Maybe we should turn BrowserContextAdapter::m_requestInterceptor into a QSharedPointer?

      Attachments

        1. main.cpp
          0.9 kB
        2. youtubeBacktrace.txt
          303 kB
        3. youtubeStacktrace.txt
          9 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            allan.jensen Allan Sandfeld Jensen
            viengelm Viktor Engelmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes