<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>48079</bug_id>
          
          <creation_ts>2010-10-21 10:54:43 -0700</creation_ts>
          <short_desc>[Qt] InspectorClientQt crashes when deleting a qwebpage which has an inspector</short_desc>
          <delta_ts>2010-11-03 09:57:04 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Qt</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Yi Shen">max.hong.shen</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ademar</cc>
    
    <cc>commit-queue</cc>
    
    <cc>suresh.voruganti</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>297507</commentid>
    <comment_count>0</comment_count>
    <who name="Yi Shen">max.hong.shen</who>
    <bug_when>2010-10-21 10:54:43 -0700</bug_when>
    <thetext>Steps to reproduce this issue
1. Launch QtTestBrowser and load a website like &apos;webkit.org&apos;
2. on the menu bar, choose &apos;Developer&apos;-&gt;&apos;Show Web Inspector&apos;
3. on the menu bar, choose &apos;Developer&apos;-&gt;&apos;QGraphicsView&apos;-&gt;&apos;Toggle use of QGraphicsView&apos;

Result, the QtTestBrowser crashes

Following is the calltrace,

#0  0x01e02d01 in WebCore::InspectorClientQt::sendMessageToFrontend (this=0x8242b50, message=&quot;{\&quot;type\&quot;:\&quot;event\&quot;,\&quot;event\&quot;:\&quot;disconnectFromBackend\&quot;,\&quot;data\&quot;:{}}&quot;)
    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=&lt;value optimized out&gt;) at ../../../WebCore/page/Page.cpp:215
#4  0x01e23934 in ~QWebPagePrivate (this=0x8229c98, __in_chrg=&lt;value optimized out&gt;) at ../../../WebKit/qt/Api/qwebpage.cpp:333
#5  0x01e28304 in ~QWebPage (this=0x820b558, __in_chrg=&lt;value optimized out&gt;) at ../../../WebKit/qt/Api/qwebpage.cpp:1771
#6  0x0807a11c in ~WebPage (this=0x820b558, __in_chrg=&lt;value optimized out&gt;) 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
...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>297510</commentid>
    <comment_count>1</comment_count>
      <attachid>71460</attachid>
    <who name="Yi Shen">max.hong.shen</who>
    <bug_when>2010-10-21 10:59:42 -0700</bug_when>
    <thetext>Created attachment 71460
first try</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>297950</commentid>
    <comment_count>2</comment_count>
    <who name="Yi Shen">max.hong.shen</who>
    <bug_when>2010-10-22 06:29:16 -0700</bug_when>
    <thetext>The problem is that m_inspectedWebPage-&gt;d-&gt;inspector is NULL in following snippet

bool InspectorClientQt::sendMessageToFrontend(const String&amp; message)
{
    if (m_inspectedWebPage-&gt;d-&gt;inspector-&gt;d-&gt;remoteFrontend) { // crash</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>297952</commentid>
    <comment_count>3</comment_count>
    <who name="Yi Shen">max.hong.shen</who>
    <bug_when>2010-10-22 06:30:23 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; The problem is that m_inspectedWebPage-&gt;d-&gt;inspector is NULL in following snippet
&gt; 
&gt; bool InspectorClientQt::sendMessageToFrontend(const String&amp; message)
&gt; {
&gt;     if (m_inspectedWebPage-&gt;d-&gt;inspector-&gt;d-&gt;remoteFrontend) { // crash

Sorry, m_inspectedWebPage-&gt;d-&gt;inspector-&gt;d is NULL</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>297973</commentid>
    <comment_count>4</comment_count>
      <attachid>71460</attachid>
    <who name="Andreas Kling">kling</who>
    <bug_when>2010-10-22 07:58:43 -0700</bug_when>
    <thetext>Comment on attachment 71460
first try

LGTM.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>297988</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-10-22 08:34:56 -0700</bug_when>
    <thetext>The commit-queue encountered the following flaky tests while processing attachment 71460:

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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>297991</commentid>
    <comment_count>6</comment_count>
      <attachid>71460</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-10-22 08:35:48 -0700</bug_when>
    <thetext>Comment on attachment 71460
first try

Clearing flags on attachment: 71460

Committed r70308: &lt;http://trac.webkit.org/changeset/70308&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>297992</commentid>
    <comment_count>7</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-10-22 08:35:53 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>299721</commentid>
    <comment_count>8</comment_count>
    <who name="Suresh Voruganti">suresh.voruganti</who>
    <bug_when>2010-10-26 12:40:49 -0700</bug_when>
    <thetext>Yi, do we need this patch for Qtwebkit 2.1 branch?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>299727</commentid>
    <comment_count>9</comment_count>
    <who name="Yi Shen">max.hong.shen</who>
    <bug_when>2010-10-26 12:46:13 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; Yi, do we need this patch for Qtwebkit 2.1 branch?

We&apos;d better to have it. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>303457</commentid>
    <comment_count>10</comment_count>
    <who name="Suresh Voruganti">suresh.voruganti</who>
    <bug_when>2010-11-02 10:28:06 -0700</bug_when>
    <thetext>Please cherry pick the fix for Qtwebkit 2.1 branch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>304073</commentid>
    <comment_count>11</comment_count>
    <who name="Ademar Reis">ademar</who>
    <bug_when>2010-11-03 09:56:53 -0700</bug_when>
    <thetext>Revision r70308 cherry-picked into qtwebkit-2.1 with commit da8bfab &lt;http://gitorious.org/webkit/qtwebkit/commit/da8bfab&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>71460</attachid>
            <date>2010-10-21 10:59:42 -0700</date>
            <delta_ts>2010-10-22 08:35:47 -0700</delta_ts>
            <desc>first try</desc>
            <filename>48079.patch</filename>
            <type>text/plain</type>
            <size>1943</size>
            <attacher name="Yi Shen">max.hong.shen</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYktpdC9xdC9DaGFuZ2VMb2cKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gV2ViS2l0L3F0L0NoYW5n
ZU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NldEluc3BlY3RvcigwKSBkaXJlY3RseSB0byBwcmV2
ZW50IHBvdGVudGlhbCBjcmFzaGVzCi0gICAgICAgIGlmIChkLT5pbnNwZWN0b3JJc0ludGVybmFs
T25seSkKLSAgICAgICAgICAgIGQtPnNldEluc3BlY3RvcigwKTsKLSAgICAgICAgZWxzZQotICAg
ICAgICAgICAgZC0+aW5zcGVjdG9yLT5zZXRQYWdlKDApOwotICAgIH0KICAgICBkZWxldGUgZDsK
IH0KIAo=
</data>

          </attachment>
      

    </bug>

</bugzilla>