RESOLVED FIXED 48079
[Qt] InspectorClientQt crashes when deleting a qwebpage which has an inspector
https://bugs.webkit.org/show_bug.cgi?id=48079
Summary [Qt] InspectorClientQt crashes when deleting a qwebpage which has an inspector
Yi Shen
Reported 2010-10-21 10:54:43 PDT
Steps to reproduce this issue 1. Launch QtTestBrowser and load a website like 'webkit.org' 2. on the menu bar, choose 'Developer'->'Show Web Inspector' 3. on the menu bar, choose 'Developer'->'QGraphicsView'->'Toggle use of QGraphicsView' Result, the QtTestBrowser crashes Following is the calltrace, #0 0x01e02d01 in WebCore::InspectorClientQt::sendMessageToFrontend (this=0x8242b50, message="{\"type\":\"event\",\"event\":\"disconnectFromBackend\",\"data\":{}}") at ../../../WebKit/qt/WebCoreSupport/InspectorClientQt.cpp:258 #1 0x01500051 in WebCore::InspectorFrontend::disconnectFromBackend (this=0x844c370) at generated/InspectorFrontend.cpp:142 #2 0x019d5062 in WebCore::InspectorController::inspectedPageDestroyed (this=0x8264068) at ../../../WebCore/inspector/InspectorController.cpp:184 #3 0x01b3e8e8 in ~Page (this=0x8242ef8, __in_chrg=<value optimized out>) at ../../../WebCore/page/Page.cpp:215 #4 0x01e23934 in ~QWebPagePrivate (this=0x8229c98, __in_chrg=<value optimized out>) at ../../../WebKit/qt/Api/qwebpage.cpp:333 #5 0x01e28304 in ~QWebPage (this=0x820b558, __in_chrg=<value optimized out>) at ../../../WebKit/qt/Api/qwebpage.cpp:1771 #6 0x0807a11c in ~WebPage (this=0x820b558, __in_chrg=<value optimized out>) at ../../../../WebKitTools/QtTestBrowser/webpage.h:39 #7 0x08072c6e in MainWindow::setPage (this=0xb7500a70, page=0x8427c58) at ../../../../WebKitTools/QtTestBrowser/mainwindow.cpp:106 #8 0x08066f5e in LauncherWindow::initializeView (this=0xb7500a70) at ../../../../Web ...
Attachments
first try (1.90 KB, patch)
2010-10-21 10:59 PDT, Yi Shen
no flags
Yi Shen
Comment 1 2010-10-21 10:59:42 PDT
Created attachment 71460 [details] first try
Yi Shen
Comment 2 2010-10-22 06:29:16 PDT
The problem is that m_inspectedWebPage->d->inspector is NULL in following snippet bool InspectorClientQt::sendMessageToFrontend(const String& message) { if (m_inspectedWebPage->d->inspector->d->remoteFrontend) { // crash
Yi Shen
Comment 3 2010-10-22 06:30:23 PDT
(In reply to comment #2) > The problem is that m_inspectedWebPage->d->inspector is NULL in following snippet > > bool InspectorClientQt::sendMessageToFrontend(const String& message) > { > if (m_inspectedWebPage->d->inspector->d->remoteFrontend) { // crash Sorry, m_inspectedWebPage->d->inspector->d is NULL
Andreas Kling
Comment 4 2010-10-22 07:58:43 PDT
Comment on attachment 71460 [details] first try LGTM.
WebKit Commit Bot
Comment 5 2010-10-22 08:34:56 PDT
The commit-queue encountered the following flaky tests while processing attachment 71460 [details]: java/lc3/JSObject/ToObject-001.html Please file bugs against the tests. The author(s) of the test(s) are ap@webkit.org and ap@webkit.org. The commit-queue is continuing to process your patch.
WebKit Commit Bot
Comment 6 2010-10-22 08:35:48 PDT
Comment on attachment 71460 [details] first try Clearing flags on attachment: 71460 Committed r70308: <http://trac.webkit.org/changeset/70308>
WebKit Commit Bot
Comment 7 2010-10-22 08:35:53 PDT
All reviewed patches have been landed. Closing bug.
Suresh Voruganti
Comment 8 2010-10-26 12:40:49 PDT
Yi, do we need this patch for Qtwebkit 2.1 branch?
Yi Shen
Comment 9 2010-10-26 12:46:13 PDT
(In reply to comment #8) > Yi, do we need this patch for Qtwebkit 2.1 branch? We'd better to have it. Thanks!
Suresh Voruganti
Comment 10 2010-11-02 10:28:06 PDT
Please cherry pick the fix for Qtwebkit 2.1 branch
Ademar Reis
Comment 11 2010-11-03 09:56:53 PDT
Revision r70308 cherry-picked into qtwebkit-2.1 with commit da8bfab <http://gitorious.org/webkit/qtwebkit/commit/da8bfab>
Note You need to log in before you can comment on or make changes to this bug.