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

QWebEngineHistory::currentItem() segfaults while page is loading

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.8.0
    • Fix Version/s: 5.9.0 Beta 2
    • Component/s: WebEngine
    • Labels:
      None
    • Environment:
      Archlinux
    • Commits:
      c554f3348cd0baea8221e668d41132cea0833a8a

      Description

      I unfortunately don't have a C++ example for this, but this Python example which simply calls history().currentItem() on loadStarted:

      #!/usr/bin/env python3
      
      import sys
      
      from PyQt5.QtCore import QUrl
      from PyQt5.QtWidgets import QApplication
      from PyQt5.QtWebEngineWidgets import QWebEngineView
      
      app = QApplication(sys.argv)
      
      wv = QWebEngineView()
      wv.loadStarted.connect(lambda: wv.history().currentItem())
      
      wv.load(QUrl("https://example.com"))
      wv.show()
      
      app.exec_()
      

      segfaults here:

      #0  0x00007fffed2aab70 in QWebEngineHistoryItem::QWebEngineHistoryItem(QWebEngineHistoryItem const&) (this=0x25cc330, other=...)
          at /tmp/makepkg/qt5-webengine-debug/src/qtwebengine-opensource-src-5.8.0/src/webenginewidgets/api/qwebenginehistory.cpp:65
      #1  0x00007fffed2ab4c1 in QWebEngineHistory::currentItem() const (this=<optimized out>)
          at /tmp/makepkg/qt5-webengine-debug/src/qtwebengine-opensource-src-5.8.0/src/webenginewidgets/api/qwebenginehistory.cpp:231
      [...]
      

        Attachments

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

          Activity

            People

            • Assignee:
              viengelm Viktor Engelmann
              Reporter:
              the compiler Florian Bruhin
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes