<?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>9920</bug_id>
          
          <creation_ts>2006-07-14 13:56:09 -0700</creation_ts>
          <short_desc>REGRESSION: Assertion failure: !m_policyListener in WebFrameLoaderClient::setUpPolicyListener when re-sending form data</short_desc>
          <delta_ts>2007-07-14 06:06:03 -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>Page Loading</component>
          <version>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.verticaladventures.org/trainingmanuals.cfm</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar, NeedsReduction, Regression</keywords>
          <priority>P1</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexey Proskuryakov">ap</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>beidson</cc>
    
    <cc>ddkilzer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>49843</commentid>
    <comment_count>0</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2006-07-14 13:56:09 -0700</bug_when>
    <thetext>When trying to reproduce another bug, I got an assertion failure:

=================
ASSERTION FAILED: !reachedTerminalState (/Users/ap/WebKit/WebKit/WebView/WebLoader.m:601 -[WebLoader cancelWithError:])
=================

Immediately before that, I reloaded a page that was itself a result of form submission (see bug URL), and clicked Cancel in the sheet offering to re-send the data. I could reproduce this twice, but could not find any way to reproduce reliably.

Thread 0 Crashed:
0   com.apple.WebKit         	0x0034590c -[WebLoader cancelWithError:] + 104 (WebLoader.m:601)
1   com.apple.WebKit         	0x003859cc -[WebMainResourceLoader cancelWithError:] + 268 (WebMainResourceLoader.m:114)
2   com.apple.WebKit         	0x00385b24 -[WebMainResourceLoader stopLoadingForPolicyChange] + 128 (WebMainResourceLoader.m:126)
3   com.apple.WebKit         	0x00385ba8 -[WebMainResourceLoader continueAfterNavigationPolicy:formState:] + 84 (WebMainResourceLoader.m:134)
4   com.apple.WebKit         	0x0035a0b4 -[WebFrame(WebPrivate) _continueAfterNavigationPolicy:] + 752 (WebFrame.m:1778)
5   com.apple.WebKit         	0x003b2478 -[WebPolicyDecisionListener _usePolicy:] + 92 (WebPolicyDelegate.m:92)
6   com.apple.WebKit         	0x003b25d4 -[WebPolicyDecisionListener ignore] + 68 (WebPolicyDelegate.m:112)
7   com.apple.Safari         	0x00017ee4 0x1000 + 93924
8   com.apple.Safari         	0x000a9f6c 0x1000 + 692076
9   com.apple.AppKit         	0x938ec390 -[NSAlert didEndSheet:returnCode:contextInfo:] + 108
10  com.apple.AppKit         	0x938d73ac -[NSAlert buttonPressed:] + 380
11  com.apple.AppKit         	0x9378ac4c -[NSApplication sendAction:to:from:] + 108
12  com.apple.Safari         	0x0002956c 0x1000 + 165228
13  com.apple.AppKit         	0x9378ab80 -[NSControl sendAction:to:] + 96
14  com.apple.AppKit         	0x9378aa60 -[NSCell _sendActionFrom:] + 156
15  com.apple.AppKit         	0x937a4a88 -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 1020
16  com.apple.AppKit         	0x937a4670 -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 564
17  com.apple.AppKit         	0x937a4094 -[NSControl mouseDown:] + 536
18  com.apple.AppKit         	0x93745890 -[NSWindow sendEvent:] + 4616
19  com.apple.AppKit         	0x936ee8d4 -[NSApplication sendEvent:] + 4172
20  com.apple.Safari         	0x00021238 0x1000 + 131640
21  com.apple.AppKit         	0x936e5d10 -[NSApplication run] + 508</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40459</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2006-12-22 12:25:29 -0800</bug_when>
    <thetext>Even after all the refactoring, this bug still reproduces, although with a different assertion:

ASSERTION FAILED: !m_policyListener
(/Users/ap/WebKit/WebKit/WebCoreSupport/WebFrameLoaderClient.mm:1151 setUpPolicyListener)

Thread 0 Crashed:
0   com.apple.WebKit         	0x003d806c WebFrameLoaderClient::setUpPolicyListener(void (WebCore::FrameLoader::*)(WebCore::PolicyAction)) + 120 (WebFrameLoaderClient.mm:1151)
1   com.apple.WebKit         	0x003d84bc WebFrameLoaderClient::dispatchDecidePolicyForMIMEType(void (WebCore::FrameLoader::*)(WebCore::PolicyAction), WebCore::String const&amp;, WebCore::ResourceRequest const&amp;) + 200 (WebFrameLoaderClient.mm:670)
2   com.apple.WebCore        	0x0149094c WebCore::FrameLoader::checkContentPolicy(WebCore::String const&amp;, void (*)(void*, WebCore::PolicyAction), void*) + 176 (FrameLoaderMac.mm:626)
3   com.apple.WebCore        	0x01497494 WebCore::MainResourceLoader::didReceiveResponse(NSURLResponse*) + 784 (MainResourceLoaderMac.mm:299)
4   com.apple.WebCore        	0x01493918 WebCore::ResourceLoader::didReceiveResponse(WebCore::ResourceHandle*, WebCore::ResourceResponse const&amp;) + 80 (ResourceLoaderMac.mm:437)
5   com.apple.WebCore        	0x014a8a2c -[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:] + 164 (ResourceHandleMac.mm:268)
6   com.apple.Foundation     	0x9298da2c -[NSURLConnection(NSURLConnectionInternal) _sendCallbacks] + 416
7   com.apple.Foundation     	0x9298d810 _sendCallbacks + 156


Steps to reproduce:
1. Open http://www.verticaladventures.org/trainingmanuals.cfm
2. Enter something for the code, press Enter.
3. Dismiss an alert that appears.
4. Reload the page, click Cancel when asked about re-sending form data.
4. Reload the page again, click Resend this time.

Results: the same sheet asking about re-sending form data appears again; then WebKit crashes with an assertion.

Adding a NeedsRadar keyword, because the behavior is closely tied to Safari.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40397</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2006-12-22 13:10:23 -0800</bug_when>
    <thetext>Closed by accident, re-opening.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34580</commentid>
    <comment_count>3</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2007-01-16 18:46:06 -0800</bug_when>
    <thetext>&lt;rdar://problem/4928572&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32480</commentid>
    <comment_count>4</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-01-26 10:46:19 -0800</bug_when>
    <thetext>*** Bug 12418 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32481</commentid>
    <comment_count>5</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-01-26 10:48:12 -0800</bug_when>
    <thetext>I&apos;ve been seeing this a lot recently when playing with the W3C HTML validator using this URL:

http://validator.w3.org/#validate-by-upload

See Bug 12418 for current assertion and stack trace.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32469</commentid>
    <comment_count>6</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-01-26 11:09:10 -0800</bug_when>
    <thetext>Steps to reproduce:

1. Open Safari/WebKit.
2. Open URL:  http://validator.w3.org/
3. Click &quot;Choose File&quot; in &quot;Validate by File Upload&quot; section and select an HTML file.
4. Click &quot;Check&quot; button.
5. Let page load, but DO NOT click anywhere in the page or scroll it.
6. Click &quot;Reload&quot; button in Safari.

Expected results:

Page should reload without crashing Safari/WebKit.

Actual results:

Safari/WebKit crashes with said assertion failure.

Regression:

This is a regression from shipping Safari 2.0.4 (419.3) on Mac OS X 10.4.8 (8N1037).

Notes:

Reproduced using a locally-built debug build of WebKit r19151 with Safari 2.0.4 (419.3) on Mac OS X 10.4.8 (8N1037).

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32467</commentid>
    <comment_count>7</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-01-26 11:11:30 -0800</bug_when>
    <thetext>(In reply to comment #6)
&gt; Steps to reproduce:
&gt; 
&gt; 1. Open Safari/WebKit.
&gt; 2. Open URL:  http://validator.w3.org/
&gt; 3. Click &quot;Choose File&quot; in &quot;Validate by File Upload&quot; section and select an HTML file.
&gt; 4. Click &quot;Check&quot; button.
&gt; 5. Let page load, but DO NOT click anywhere in the page or scroll it.
&gt; 6. Click &quot;Reload&quot; button in Safari.

7. Click &quot;Send&quot; on the &quot;Are you sure you want to send a form again?&quot; sheet.

Note that a second sheet will appear, but Safari/WebKit will crash before you may click &quot;Send&quot;.  Bug 12417 is filed for the second sheet appearing.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27715</commentid>
    <comment_count>8</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2007-02-04 11:06:41 -0800</bug_when>
    <thetext>Closed in Radar; resolving</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27636</commentid>
    <comment_count>9</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-02-04 12:38:25 -0800</bug_when>
    <thetext>This still happens for me; reopening. Chris Petersen is going to reopen the Radar bug, as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>24735</commentid>
    <comment_count>10</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2007-02-09 03:38:02 -0800</bug_when>
    <thetext>Indeed, I can repro with the validator steps as well. Escalating to P1, since it blocks another P1 on the validator page.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22990</commentid>
    <comment_count>11</comment_count>
    <who name="Anders Carlsson">andersca</who>
    <bug_when>2007-02-16 12:19:13 -0800</bug_when>
    <thetext>I can&apos;t reproduce this anymore, it was probably fixed by the fix to http://bugs.webkit.org/show_bug.cgi?id=12417</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4812</commentid>
    <comment_count>12</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-07-14 06:06:03 -0700</bug_when>
    <thetext>Still happens with slightly different steps to reproduce, see bug 14617.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>