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

Crash when calling setUrl() for second time in QWebView and QGraphicsWebView with a local file

    XMLWordPrintable

Details

    • 2ac19ee6bb5732a3a585b8d9378bc65107748a36

    Description

      First show a local image in QWebView or QGraphicsWebView with setImage(QUrl("path/to/local/file.jpg")). Then try to show something else in the view with setUrl(). This causes a crash in WebCore::CachedImage::addDataBuffer (see attached stack trace).

      It seems that setting the content to the QWebView before calling setUrl() prevents the crash. Thus something like: webview->setContent("<HTML></HTML>"); can be used as a workaround.

      The attached example (qtbug42890.zip) demostrates the crash. It has 3 second timer between setting the urls and thus the crash happens after 3 seconds. Command line option -w1 shows that it doesn't crash if the first url is a web page and option -w2 demonstrates the above mentioned setContent -workaround.

      Attachments

        For Gerrit Dashboard: QTBUG-42890
        # Subject Branch Project Status CR V

        Activity

          People

            vgt Eirik Aavitsland
            qtcomsupport Qt Support
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes