[Webkit-unassigned] [Bug 36436] New: QGraphicsWebView crash when calling setView.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Mar 21 23:53:55 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=36436

           Summary: QGraphicsWebView crash when calling setView.
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: Critical
          Priority: P2
         Component: WebKit Qt
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: alexis.menard at nokia.com


Here is the test case :

#include <QtGui>
#include <QtWebKit>

class MyGraphicsItemWithItemChange : public QGraphicsWidget
{
public:
    MyGraphicsItemWithItemChange(QGraphicsItem *parent = 0) :
QGraphicsWidget(parent)
    {
        webView = new QGraphicsWebView(this);
    }

    QVariant itemChange(GraphicsItemChange change, const QVariant &value)
    {
        if (change == QGraphicsItem::ItemSceneHasChanged) {
            foreach (QGraphicsView *view, scene()->views()) {
                //FIXME: QWebPage _requires_ a QWidget view to not crash in
places such as
                // WebCore::PopupMenu::show() due to
hostWindow()->platformPageClient() == NULL
                // because QWebPage::d->client is NULL
                webView->page()->setView(view);
            }
        }
        return QGraphicsWidget::itemChange(change, value);
    }
    QGraphicsWebView *webView;
};


int main (int argc, char**argv)
{
    QApplication app(argc, argv);
    QGraphicsScene scene;
    QGraphicsView view(&scene);
    QGraphicsWidget grandGrandParent;
    grandGrandParent.resize(200, 200);
    scene.addItem(&grandGrandParent);
    QGraphicsWidget grandParent;
    grandParent.resize(200, 200);
    QGraphicsWidget parent(&grandParent);
    parent.resize(200, 200);
    MyGraphicsItemWithItemChange item(&parent);
    grandParent.setParentItem(&grandGrandParent);
    view.show();
    return app.exec();
}

It's a bit nasty but it crashes. I'm not sure the workaround in this code is
still needed but at least it should not crash. It seems to be a memory
corruption  . You better grab a coffee while working on that bug :D. Happy
face.

KDE bugs related : https://bugs.kde.org/show_bug.cgi?id=227673 and also Amarok
has the same issue (after I fixed another bug because of the same nasty
itemChange thing but totally unrelated).

IRC : darktears

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list