February 8, 2011

MattB MattB
Lab Rat
35 posts

WebView crashing on Today’s (Feb 8) google homepage

 

I’d like to file a bug, but not sure how to capture a relevant crash report. Is there anyway to make WebView save it’s cache so this can be reproduced offline? Here’s code to repro the crash:

File: webview.qml

  1. import Qt 4.7
  2. import QtWebKit 1.0
  3.  
  4. WebView {
  5.     id: browser
  6.     width:  800
  7.     height: 600
  8.  
  9.     url: "http://www.google.com"
  10. }

File: test.qml

  1. import Qt 4.7
  2.  
  3. Item {
  4.     width: 800
  5.     height: 600
  6.     focus: true
  7.  
  8.     Keys.onPressed: {
  9.         switch(event.key)
  10.         {
  11.         case Qt.Key_W: loader.source = "webview.qml" ; break ;
  12.         case Qt.Key_B: loader.source = ""   ; break ;
  13.         }
  14.     }
  15.  
  16.     Loader {
  17.         id: loader
  18.         anchors.fill: parent
  19.         source: "webview.qml"
  20.     }
  21. }

Run this:
qmlviewer /tmp/test.qml

Then type “b” to clear the loader source. During deconstruction of the WebView, qmlviewer crashes.

Running gdb:
gdb —args qmlviewer /tmp/test.qml

  1. Program received signal SIGSEGV, Segmentation fault.
  2. QGraphicsScene::removeItem (this=0x0, item=0x836fbb0) at /var/tmp/qt-src/src/gui/graphicsview/qgraphicsscene.cpp:2948
  3. 2948 /var/tmp/qt-src/src/gui/graphicsview/qgraphicsscene.cpp: No such file or directory.
  4.  in /var/tmp/qt-src/src/gui/graphicsview/qgraphicsscene.cpp

  1.   2945  void QGraphicsScene::removeItem(QGraphicsItem *item)
  2.   2946  {
  3.   2947      // ### Refactoring: This function shares much functionality with _q_removeItemLater()
  4.   2948      Q_D(QGraphicsScene);
  5.   2949      if (!item) {
  6.   2950          qWarning("QGraphicsScene::removeItem: cannot remove 0-item");
  7.   2951          return;
  8.   2952      }
  9.   2953      if (item->scene() != this) {
  10.   2954          qWarning("QGraphicsScene::removeItem: item %p's scene (%p)"
  11.   2955                   " is different from this scene (%p)",
  12.   2956                   item, item->scene(), this);
  13.   2957          return;
  14.   2958      }
  15.   2959  
  16.   2960      // Notify the item that it's scene is changing to 0, allowing the item to
  17.   2961      // react.
  18.   2962      const QVariant newSceneVariant(item->itemChange(QGraphicsItem::ItemSceneChange,
  19.   2963                                                      qVariantFromValue<QGraphicsScene *>(0)));
  20.   2964      QGraphicsScene *targetScene = qVariantValue<QGraphicsScene *>(newSceneVariant);
  21.   2965      if (targetScene != 0 && targetScene != this) {
  22.   2966          targetScene->addItem(item);
  23.   2967          return;
  24.   2968      }
  25.   2969  
  26.   2970      d->removeItemHelper(item);
  27.   2971  
  28.   2972      // Deliver post-change notification
  29.   2973      item->itemChange(QGraphicsItem::ItemSceneHasChanged, newSceneVariant);
  30.   2974  
  31.   2975      d->updateInputMethodSensitivityInViews();
  32.   2976  }

2 replies

February 9, 2011

mbrasser mbrasser
Lab Rat
452 posts

Hi,

The information you’ve provided above (along with the version you are using and the platform you are running on) should be sufficient for a bug report.

Thanks,
Michael

April 24, 2012

Alcatraz Alcatraz
Lab Rat
25 posts

Has this bug been confirmed with Qt ?

this is happening on a Telus Page [telusmobility.com]

i know this is an older post but it relates to my issue…

i have disabled javascriptenabled and page works fine now

any ideas as to why ?

 
  ‹‹ [SOLVED] ListElement and QT_TR_NOOP()      "QtMultimediaKit" is not installed Problem ››

You must log in to post a reply. Not a member yet? Register here!