Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.3.2, 5.4.0 Beta, 5.4.1
-
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.