<?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>89467</bug_id>
          
          <creation_ts>2012-06-19 07:13:03 -0700</creation_ts>
          <short_desc>[WK2] ASSERTION FAILED: m_loadState == LoadStateProvisional at fast/loader/document-with-fragment-url-1.html</short_desc>
          <delta_ts>2012-09-04 05:03:55 -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>WebKit2</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>66783</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>LayoutTestFailure, Qt, QtTriaged</keywords>
          <priority>P1</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>79668</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Balazs Kelemen">kbalazs</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>jturcotte</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>652413</commentid>
    <comment_count>0</comment_count>
    <who name="Balazs Kelemen">kbalazs</who>
    <bug_when>2012-06-19 07:13:03 -0700</bug_when>
    <thetext>crash log for WebKitTestRunner (pid 24180):
STDOUT: &lt;empty&gt;
STDERR: ASSERTION FAILED: m_loadState == LoadStateProvisional

/home/balazs/WebKitGit/Source/WebKit2/UIProcess/WebFrameProxy.cpp(164) : void WebKit::WebFrameProxy::didCommitLoad(const WTF::String&amp;, const WebKit::PlatformCertificateInfo&amp;)
_ZN6WebKit13WebFrameProxy13didCommitLoadERKN3WTF6StringERKNS_23PlatformCertificateInfoE+0x44
_ZN6WebKit12WebPageProxy21didCommitLoadForFrameEmRKN3WTF6StringEbRKNS_23PlatformCertificateInfoEPN7CoreIPC15ArgumentDecoderE+0x12e)
_ZN7CoreIPC18callMemberFunctionIN6WebKit12WebPageProxyEMS2_FvmRKN3WTF6StringEbRKNS1_23PlatformCertificateInfoEPNS_15ArgumentDecoderEEmS4_bS7_EEvRKNS_10Arguments4IT1_T2_T3_T4_EESB_PT_T0_+0x87
_ZN7CoreIPC21handleMessageVariadicIN8Messages12WebPageProxy21DidCommitLoadForFrameEN6WebKit12WebPageProxyEMS5_FvmRKN3WTF6StringEbRKNS4_23PlatformCertificateInfoEPNS_15ArgumentDecoderEEEEvSE_PT0_T1_+0x61
_ZN6WebKit12WebPageProxy29didReceiveWebPageProxyMessageEPN7CoreIPC10ConnectionENS1_9MessageIDEPNS1_15ArgumentDecoderE+0xc3a</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>652416</commentid>
    <comment_count>1</comment_count>
    <who name="Balazs Kelemen">kbalazs</who>
    <bug_when>2012-06-19 07:14:02 -0700</bug_when>
    <thetext>Seen in local test session, WebKit1 debug, r120688, desktop, Ubuntu 11.10.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>652418</commentid>
    <comment_count>2</comment_count>
    <who name="Balazs Kelemen">kbalazs</who>
    <bug_when>2012-06-19 07:15:30 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; Seen in local test session, WebKit1 debug, r120688, desktop, Ubuntu 11.10.

No, it is WebKit2.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>658537</commentid>
    <comment_count>3</comment_count>
    <who name="Balazs Kelemen">kbalazs</who>
    <bug_when>2012-06-27 04:49:42 -0700</bug_when>
    <thetext>The fact is that no matter what test we run after LayoutTests/fast/loader/document-destruction-within-unload.html (the previous of the one in the title), we get this assertion.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>659339</commentid>
    <comment_count>4</comment_count>
    <who name="Balazs Kelemen">kbalazs</who>
    <bug_when>2012-06-28 01:50:06 -0700</bug_when>
    <thetext>This does not seems to be Qt specific, it actually has a Mac counterpart: #66783. I believe we would hit this assertion on Mac-WK2 if it were not be skipped.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>659347</commentid>
    <comment_count>5</comment_count>
    <who name="Balazs Kelemen">kbalazs</who>
    <bug_when>2012-06-28 02:07:05 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; This does not seems to be Qt specific, it actually has a Mac counterpart: #66783. I believe we would hit this assertion on Mac-WK2 if it were not be skipped.

I learned how to to refer to another bug: bug 66783</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>659352</commentid>
    <comment_count>6</comment_count>
    <who name="Balazs Kelemen">kbalazs</who>
    <bug_when>2012-06-28 02:23:06 -0700</bug_when>
    <thetext>I tried to catch the order of load events in WebFrameProxy. I signed where I think the problem is.

0x7f6115d08f00 -- didStartProvisionalLoad: url=about:blank
0x7f6115d08f00 -- didCommitLoad: url=about:blank
0x7f6115d08f00 -- didFinishLoad: url=about:blank
0x7f6115d08f00 -- didStartProvisionalLoad: url=fast/loader/document-destruction-within-unload.html
0x7f6115d08f00 -- didCommitLoad: url=fast/loader/document-destruction-within-unload.html
    0x7f6115d08e60 -- didStartProvisionalLoad: url=fast/loader/resources/document-destruction-within-unload-iframe.html
    0x7f6115d08e60 -- didCommitLoad: url=fast/loader/resources/document-destruction-within-unload-iframe.html
        0x7f6115d3cd20 -- didStartProvisionalLoad: url=fast/loader/resources/does_not_exist
        0x7f6115d08dc0 -- didStartProvisionalLoad: url=fast/loader/resources/document-destruction-within-unload.svg
        0x7f6115d3cd20 -- didFailProvisionalLoad: url=fast/loader/resources/does_not_exist
        0x7f6115d08dc0 -- didCommitLoad: url=fast/loader/resources/document-destruction-within-unload.svg
        0x7f6115d08dc0 -- didFinishLoad: url=fast/loader/resources/document-destruction-within-unload.svg
    0x7f6115d08e60 -- didFinishLoad: url=fast/loader/resources/document-destruction-within-unload-iframe.html
0x7f6115d08f00 -- didFinishLoad: url=fast/loader/document-destruction-within-unload.html
    0x7f6115d08e60 -- didStartProvisionalLoad: url=fast/loader/resources/document-destruction-within-unload-iframe.html
    0x7f6115d08e60 -- didFailProvisionalLoad: url=fast/loader/resources/document-destruction-within-unload-iframe.html
    0x7f6115d08e60 -- didCommitLoad: url=  &lt;============= this commit seems to be the problem.
0x7f6115d08f00 -- didStartProvisionalLoad: url=about:blank
0x7f6115d08f00 -- didCommitLoad: url=about:blank
0x7f6115d08f00 -- didFinishLoad: url=about:blank
0x7f6115d08f00 -- didStartProvisionalLoad: url=css1/basic/comments.html
0x7f6115d08f00 -- didCommitLoad: url=css1/basic/comments.html
0x7f6115d08f00 -- didFinishLoad: url=css1/basic/comments.html

Let&apos;s look at the iframe loaded in the test (fast/loader/resources/document-destruction-within-unload-iframe.html):

&lt;html&gt;
&lt;body&gt;
&lt;script&gt;
function runTest() {
    var test = document.getElementById(&apos;root&apos;).contentDocument;
    test.firstChild.setAttribute(&apos;onunload&apos;, &quot;parent.clearUs();&quot;);
    location.reload();
}

function clearUs() {
    document.write();
    parent.done();
}
&lt;/script&gt;
&lt;object data=&quot;does_not_exist&quot;&gt;&lt;/object&gt;
&lt;object data=&quot;document-destruction-within-unload.svg&quot; id=&quot;root&quot; onload=&quot;runTest();&quot;&gt;&lt;/object&gt;
&lt;/body&gt;
&lt;/html&gt;

So, upon loading the svg file, the iframe does a reload. This is why didStartProvisionalLoad called again for it. On the other hand the onunload handler of the svg element does document.write() which results in cancelling the load, and didFailProvisionalLoad is called. I think it is correct so far. The question is how can be data committed the this cancelled load after that (which results in didCommitLoad called)? In bug 66783 the same seems to happen, and if I put equivalent assertions in FrameLoaderClientQt, I get the same fail (with Qt WK1 of course), so basically it seems to be a general bug in loader code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>659614</commentid>
    <comment_count>7</comment_count>
    <who name="Balazs Kelemen">kbalazs</who>
    <bug_when>2012-06-28 10:57:01 -0700</bug_when>
    <thetext>I checked, it also asserts on Mac.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>710991</commentid>
    <comment_count>8</comment_count>
    <who name="Balazs Kelemen">kbalazs</who>
    <bug_when>2012-09-04 05:03:55 -0700</bug_when>
    <thetext>Fixed in http://trac.webkit.org/changeset/127347, thanks to Nate Chapin.

*** This bug has been marked as a duplicate of bug 66783 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>