<?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>32300</bug_id>
          
          <creation_ts>2009-12-08 18:52:45 -0800</creation_ts>
          <short_desc>[Qt] crash when clicking &quot;Sign out&quot; in GMail</short_desc>
          <delta_ts>2009-12-14 12:50:03 -0800</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>http://www.gmail.com</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David T. L. Wong">davidtlwong</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>benjamin</cc>
    
    <cc>commit-queue</cc>
    
    <cc>kenneth</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>169870</commentid>
    <comment_count>0</comment_count>
    <who name="David T. L. Wong">davidtlwong</who>
    <bug_when>2009-12-08 18:52:45 -0800</bug_when>
    <thetext>QtLauncher and Arora segmentation fault when clicking &quot;Sign out&quot; in GMail.

It is found that m_resourceHandle is reset to Nil within QNetworkReplyHandler::sendResponseIfNeeded() for some reason.
Page redirection related.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>169871</commentid>
    <comment_count>1</comment_count>
    <who name="David T. L. Wong">davidtlwong</who>
    <bug_when>2009-12-08 18:58:51 -0800</bug_when>
    <thetext>Back trace for QtLauncher against git://gitorious.org/qtwebkit/qtwebkit.git tag qtwebkit-4.6.0

#0  0xb7696640 in WebCore::QNetworkReplyHandler::sendResponseIfNeeded() ()
   from /home/david/browser/qtwebkit/WebKitBuild/Release/lib/libQtWebKit.so.4
#1  0xb76985d3 in WebCore::QNetworkReplyHandler::qt_metacall(QMetaObject::Call, int, void**) ()
   from /home/david/browser/qtwebkit/WebKitBuild/Release/lib/libQtWebKit.so.4
#2  0xb6393f0b in QMetaCallEvent::placeMetaCall(QObject*) ()
   from /usr/lib/libQtCore.so.4
#3  0xb63955fe in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#4  0xb66aff54 in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /usr/lib/libQtGui.so.4
#5  0xb66b767c in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/libQtGui.so.4
#6  0xb63856cb in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
   from /usr/lib/libQtCore.so.4
#7  0xb63862b2 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
#8  0xb638647d in QCoreApplication::sendPostedEvents(QObject*, int) ()
   from /usr/lib/libQtCore.so.4
#9  0xb63b03ff in ?? () from /usr/lib/libQtCore.so.4
#10 0xb593fe78 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#11 0xb5943720 in ?? () from /lib/libglib-2.0.so.0
#12 0xb5943853 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#13 0xb63b002c in QEventDispatcherGlib::processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) () from /usr/lib/libQtCore.so.4
#14 0xb6750be5 in ?? () from /usr/lib/libQtGui.so.4
#15 0xb6383c79 in QEventLoop::processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) () from /usr/lib/libQtCore.so.4
#16 0xb63840ca in QEventLoop::exec(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) ()
   from /usr/lib/libQtCore.so.4
#17 0xb638653f in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#18 0xb66afdd7 in QApplication::exec() () from /usr/lib/libQtGui.so.4
#19 0x08059951 in main ()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>170738</commentid>
    <comment_count>2</comment_count>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2009-12-11 06:41:26 -0800</bug_when>
    <thetext>I cannot reproduce this bug with Qt 4.6 trunk + Qt Webkit trunk. Nor with the webkit of Qt 4.6 trunk. The bug has probably be fixed since the 4.6.0 tag.

Could you try with the last version of Webkit/Qt?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>170768</commentid>
    <comment_count>3</comment_count>
    <who name="David T. L. Wong">davidtlwong</who>
    <bug_when>2009-12-11 08:17:24 -0800</bug_when>
    <thetext>Which repository/branch/tag are you referring to? It&apos;s better if you guide me to a link.

I just tried WebKit.org svn trunk r51985 qt build, but still experiencing the same problem.

The problem is not being seen from every gmail user/configuration.
I have one colleague&apos;s account experience the logout problem, but another colleague&apos;s account doesn&apos;t.

And time clicking &quot;Sign out&quot; link is somewhat important too.
It is likely to crash if waiting all things loaded, especially the friend list of chat block of google talk on the left.

David</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>170775</commentid>
    <comment_count>4</comment_count>
    <who name="David T. L. Wong">davidtlwong</who>
    <bug_when>2009-12-11 08:49:25 -0800</bug_when>
    <thetext>What I found is
1. It enter sendResponseIfNeeded()
2. It enter last if(redirection.isValid()) block, m_resourceHandle is still valid
3. It execute &quot;client-&gt;willSendRequest&quot;, m_resourceHandle is staill valid before entering willSendRequest()
4. Some callback trigger QNetworkReplyHandler::abort() and reset m_resourceHandle to Nil
5. Back to sendResponseIfNeeded(). Null pointer access when executing newRequest.toNetworkRequest(m_resource-&gt;getInternal()-&gt;m_frame);


I do believe it is a real bug that need to be fixed.
I tried qt 4.6.0, webkit.org svn trunk at 20 Oct 2009, all experience this problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>171288</commentid>
    <comment_count>5</comment_count>
    <who name="David T. L. Wong">davidtlwong</who>
    <bug_when>2009-12-13 19:53:43 -0800</bug_when>
    <thetext>call trace that showing QNetworkReplyHandler::abort() is called within
QNetworkReplyHandler::sendResponseIfNeeded(). m_resourceHandle is reset to nil which cause the segmentation fault.

#0  WebCore::QNetworkReplyHandler::abort (this=0xa5c1c70)
    at ../../../webkit_dot_org_svn/WebCore/platform/network/qt/QNetworkReplyHandler.cpp:175
#1  0xb65c37db in WebCore::ResourceHandle::cancel (this=0xa5c2678)
    at ../../../webkit_dot_org_svn/WebCore/platform/network/qt/ResourceHandleQt.cpp:148
#2  0xb63296eb in WebCore::ResourceLoader::didCancel (this=0xb7d7ac0, 
    error=@0xbfe467ac)
    at ../../../webkit_dot_org_svn/WebCore/loader/ResourceLoader.cpp:329
#3  0xb632b921 in WebCore::SubresourceLoader::didCancel (this=0xb7d7ac0, 
    error=@0xbfe467ac)
    at ../../../webkit_dot_org_svn/WebCore/loader/SubresourceLoader.cpp:234
#4  0xb6329849 in WebCore::ResourceLoader::cancel (this=0xb7d7ac0, 
    error=@0xbfe467fc)
    at ../../../webkit_dot_org_svn/WebCore/loader/ResourceLoader.cpp:350
#5  0xb632979a in WebCore::ResourceLoader::cancel (this=0xb7d7ac0)
    at ../../../webkit_dot_org_svn/WebCore/loader/ResourceLoader.cpp:340
#6  0xb62e662a in WebCore::DocumentThreadableLoader::cancel (this=0xadef7b0)
    at ../../../webkit_dot_org_svn/WebCore/loader/DocumentThreadableLoader.cpp:160
#7  0xb6590deb in WebCore::XMLHttpRequest::internalAbort (this=0x9fd7a48)
    at ../../../webkit_dot_org_svn/WebCore/xml/XMLHttpRequest.cpp:570
#8  0xb6591141 in WebCore::XMLHttpRequest::networkError (this=0x9fd7a48)
---Type &lt;return&gt; to continue, or q &lt;return&gt; to quit---
    at ../../../webkit_dot_org_svn/WebCore/xml/XMLHttpRequest.cpp:612
#9  0xb65920e3 in WebCore::XMLHttpRequest::didFailRedirectCheck (
    this=0x9fd7a48)
    at ../../../webkit_dot_org_svn/WebCore/xml/XMLHttpRequest.cpp:825
#10 0xb62e677b in WebCore::DocumentThreadableLoader::willSendRequest (
    this=0xadef7b0, loader=0xb7d7ac0, request=@0xbfe46a84)
    at ../../../webkit_dot_org_svn/WebCore/loader/DocumentThreadableLoader.cpp:173
#11 0xb632b0ed in WebCore::SubresourceLoader::willSendRequest (this=0xb7d7ac0, 
    newRequest=@0xbfe46a84, redirectResponse=@0xbfe46b28)
    at ../../../webkit_dot_org_svn/WebCore/loader/SubresourceLoader.cpp:115
#12 0xb63299f2 in WebCore::ResourceLoader::willSendRequest (this=0xb7d7ac0, 
    request=@0xbfe46a84, redirectResponse=@0xbfe46b28)
    at ../../../webkit_dot_org_svn/WebCore/loader/ResourceLoader.cpp:379
#13 0xb65c7dcb in WebCore::QNetworkReplyHandler::sendResponseIfNeeded (
    this=0xa5c1c70)
    at ../../../webkit_dot_org_svn/WebCore/platform/network/qt/QNetworkReplyHandler.cpp:336
#14 0xb65c805f in WebCore::QNetworkReplyHandler::forwardData (this=0xa5c1c70)
    at ../../../webkit_dot_org_svn/WebCore/platform/network/qt/QNetworkReplyHandler.cpp:351
#15 0xb65c8a07 in WebCore::QNetworkReplyHandler::qt_metacall (this=0xa5c1c70, 
    _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0xbc61c68)
    at ./moc_QNetworkReplyHandler.cpp:78
#16 0xb3fa1f0b in QMetaCallEvent::placeMetaCall () from /usr/lib/libQtCore.so.4
#17 0xb3fa35fe in QObject::event () from /usr/lib/libQtCore.so.4
#18 0xb42bdf54 in QApplicationPrivate::notify_helper ()
   from /usr/lib/libQtGui.so.4
#19 0xb42c567c in QApplication::notify () from /usr/lib/libQtGui.so.4
#20 0xb3f936cb in QCoreApplication::notifyInternal ()
   from /usr/lib/libQtCore.so.4
#21 0xb3f942b2 in QCoreApplicationPrivate::sendPostedEvents ()
   from /usr/lib/libQtCore.so.4
#22 0xb3f9447d in QCoreApplication::sendPostedEvents ()
   from /usr/lib/libQtCore.so.4
#23 0xb3fbe3ff in ?? () from /usr/lib/libQtCore.so.4
#24 0xb359be78 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#25 0xb359f720 in ?? () from /lib/libglib-2.0.so.0
#26 0x098eccf8 in ?? ()
#27 0x00000000 in ?? ()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>171322</commentid>
    <comment_count>6</comment_count>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2009-12-14 02:29:59 -0800</bug_when>
    <thetext>I cannot reproduce it, but given the last trace, the bug is valid.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>171325</commentid>
    <comment_count>7</comment_count>
      <attachid>44781</attachid>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2009-12-14 02:49:57 -0800</bug_when>
    <thetext>Created attachment 44781
Patch

Simon fixed this in r29515 but r50454 introduced a regression by changing:
-    m_request = r.toNetworkRequest();
+    m_request = r.toNetworkRequest(m_resourceHandle-&gt;getInternal()-&gt;m_frame);</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>171328</commentid>
    <comment_count>8</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2009-12-14 02:54:10 -0800</bug_when>
    <thetext>style-queue ran check-webkit-style on attachment 44781 without any errors.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>171351</commentid>
    <comment_count>9</comment_count>
      <attachid>44781</attachid>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2009-12-14 05:27:59 -0800</bug_when>
    <thetext>Comment on attachment 44781
Patch

Great as always Benjamin! :-)

Btw, could you look into adding a layout test for this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>171375</commentid>
    <comment_count>10</comment_count>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2009-12-14 06:33:23 -0800</bug_when>
    <thetext>(In reply to comment #9)
&gt; (From update of attachment 44781 [details])
&gt; Great as always Benjamin! :-)
&gt; 
&gt; Btw, could you look into adding a layout test for this?

It is possible to write a autotest for it, but it would require mocking the network stack (we need a correct loading, then redirection, then a failure in the middle of the redirection).

The work is not worth it, we probably need a general way of simulating network problem to do this kind of tests.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>171379</commentid>
    <comment_count>11</comment_count>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2009-12-14 06:38:08 -0800</bug_when>
    <thetext>Maybe we should create a JIRA task for that?

&gt; It is possible to write a autotest for it, but it would require mocking the
&gt; network stack (we need a correct loading, then redirection, then a failure in
&gt; the middle of the redirection).
&gt; 
&gt; The work is not worth it, we probably need a general way of simulating network
&gt; problem to do this kind of tests.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>171513</commentid>
    <comment_count>12</comment_count>
      <attachid>44781</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2009-12-14 12:49:59 -0800</bug_when>
    <thetext>Comment on attachment 44781
Patch

Clearing flags on attachment: 44781

Committed r52112: &lt;http://trac.webkit.org/changeset/52112&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>171514</commentid>
    <comment_count>13</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2009-12-14 12:50:03 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>44781</attachid>
            <date>2009-12-14 02:49:57 -0800</date>
            <delta_ts>2009-12-14 12:49:59 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>fix_rediction_with_network_error.patch</filename>
            <type>text/plain</type>
            <size>1836</size>
            <attacher name="Benjamin Poulain">benjamin</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1dlYkNvcmUvQ2hhbmdlTG9nIGIvV2ViQ29yZS9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