Bug 46380

Summary: REGRESSION: Crash when downloading a file
Product: WebKit Reporter: jonah
Component: Page LoadingAssignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal CC: 6a6eb32ax4, ap, c.petersen87, cybero, darin, dimitris.apostolou, kevin, knavia, lejo, skepticus, smkolins, svetloslav, x11
Priority: P1 Keywords: Regression
Version: 528+ (Nightly build)   
Hardware: Macintosh Intel   
OS: OS X 10.6   
Attachments:
Description Flags
proposed fix darin: review+

Description jonah 2010-09-23 11:49:50 PDT
On attempting to open a resource with a "Content-Disposition" header set to "attachment" in the latest nightly build I see a "Failed to load resource" error in the browser's console. In many cases I am still able to download the attachment (see http://trac.webkit.org/raw-attachment/wiki/QtWebKit/CodeCamp200912/ARM-JIT.pdf as an example) however the error appears to halt any javascript running on the page which can break page behavior any time a user clicks on an attachment link.

This behaviors appears to be consistent on the webkit nightly (r68077) and the current chromium nightly (60289).
Comment 1 Alexey Proskuryakov 2010-09-23 15:15:23 PDT
Could you please provide steps to reproduce this problem? What sites are you seeing it on?
Comment 2 jonah 2010-09-23 15:39:11 PDT
Reproduction:

1. Open developer console.
2. Run the following Javascript to demonstrate a recurring event:
`x = setInterval(function() {console.log(new Date())}, 1000);` 
3. Load http://trac.webkit.org/raw-attachment/wiki/QtWebKit/CodeCamp200912/ARM-JIT.pdf
4. Note "Failed to load resource" error in console, javascript has stopped and no longer logs times to the console.
Comment 3 Alexey Proskuryakov 2010-09-23 16:05:03 PDT
The latest nightly crashes for me when following these steps. Either way, it's no good.
Comment 4 Alexey Proskuryakov 2010-09-23 16:39:57 PDT
I don't understand how this could not crash for you. Are you perhaps running Safari in 32-bit mode?
Comment 5 Alexey Proskuryakov 2010-09-23 16:46:19 PDT
Created attachment 68619 [details]
proposed fix

As mysterious as it is, let's at least fix the crasher, and see if that magically helps.
Comment 6 Alexey Proskuryakov 2010-09-24 00:09:13 PDT
*** Bug 46438 has been marked as a duplicate of this bug. ***
Comment 7 Alexey Proskuryakov 2010-09-24 00:09:23 PDT
*** Bug 46441 has been marked as a duplicate of this bug. ***
Comment 8 jonah 2010-09-24 09:53:51 PDT
In case it's any help, I can reproduce the issue as described above in Chrome 6.0.472.63 and Safari 5.0.2 (6533.18.5).
Comment 9 Alexey Proskuryakov 2010-09-24 10:10:02 PDT
OK, that explains the mystery - I'm fixing a completely different issue, not what you reported.

But I definitely cannot reproduce this in Safari 5.0.2. Here is what I've been doing:

1. Open a new Safari window.
2. Type "about:blank" (no quote marks) into address bar, press enter.
3. Press Cmd+Shift+C to open Web Inspector.
4. Run the following Javascript in Web Inspector console:
x = setInterval(function() {console.log(new Date())}, 1000);
5. Paste "http://trac.webkit.org/raw-attachment/wiki/QtWebKit/CodeCamp200912/ARM-JIT.pdf" into address bar (over "about:blank")

There is a "failed to load resource" error in console, but the timer keeps running.
Comment 10 Darin Adler 2010-09-24 10:14:01 PDT
Comment on attachment 68619 [details]
proposed fix

Thank you for fixing this regression I just caused!
Comment 11 Alexey Proskuryakov 2010-09-24 10:20:02 PDT
Fixed in <http://trac.webkit.org/changeset/68266>.

I'm sorry for pre-empting this bug report to fix a completely different issue. I think that it makes most sense to close this bug now, and to file a new one for the issue you are seeing.

Could you please file it? I'm still unable to reproduce the problem, so some more detail would help.
Comment 12 jonah 2010-09-24 10:42:13 PDT
Sorry Alexey, looks like I got my test outputs confused, you're correct that Safari 5.0.2 reports "Failed to load resource: Frame load interrupted" and continues to fire javascript timers as expected.
I'll repeat my test with more detail and open a new bug.
Comment 13 jonah 2010-09-24 11:43:03 PDT
Re-created as https://bugs.webkit.org/show_bug.cgi?id=46491
Comment 14 Mark Rowe (bdash) 2010-09-24 15:40:14 PDT
*** Bug 46508 has been marked as a duplicate of this bug. ***
Comment 15 Alexey Proskuryakov 2010-09-25 16:05:29 PDT
*** Bug 46507 has been marked as a duplicate of this bug. ***
Comment 16 Alexey Proskuryakov 2010-09-25 16:16:27 PDT
*** Bug 46549 has been marked as a duplicate of this bug. ***
Comment 17 Alexey Proskuryakov 2010-09-25 16:18:56 PDT
*** Bug 46568 has been marked as a duplicate of this bug. ***
Comment 18 Alexey Proskuryakov 2010-09-26 00:42:53 PDT
*** Bug 46575 has been marked as a duplicate of this bug. ***
Comment 19 Alexey Proskuryakov 2010-09-26 18:20:18 PDT
*** Bug 46569 has been marked as a duplicate of this bug. ***
Comment 20 Alexey Proskuryakov 2010-09-27 10:36:26 PDT
*** Bug 46577 has been marked as a duplicate of this bug. ***
Comment 21 Alexey Proskuryakov 2010-09-27 10:36:43 PDT
*** Bug 46620 has been marked as a duplicate of this bug. ***
Comment 22 Alexey Proskuryakov 2010-09-27 11:12:47 PDT
*** Bug 46569 has been marked as a duplicate of this bug. ***
Comment 23 Alexey Proskuryakov 2010-09-27 11:19:56 PDT
*** Bug 46574 has been marked as a duplicate of this bug. ***
Comment 24 Alexey Proskuryakov 2010-09-27 19:59:32 PDT
*** Bug 46661 has been marked as a duplicate of this bug. ***