Bug 117278

Summary: REGRESSION (r151088): Crash navigating away from non-loaded main resources with non-loaded scripts.
Product: WebKit Reporter: Chris Petersen <c.petersen87>
Component: Page LoadingAssignee: Brady Eidson <beidson>
Status: CLOSED FIXED    
Severity: Major CC: beidson, commit-queue, esprehn+autocc, lforschler, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Crash log.txt
none
Patch v1 - Fix + test andersca: review+

Description Chris Petersen 2013-06-05 16:06:49 PDT
Crash occurs at WebCore::Document::haveStylesheetsLoaded() when attempting to load a page. I have seen this crash on the last few webkit nightly builds. I have started to type partial URL in the address field and it autocompletes the rest of URL. When I attempt to load the URL and go to that page, it crashes. I need to find a way to reproduce it. Here is the crash log information for now.
Comment 1 Chris Petersen 2013-06-05 16:09:18 PDT
I have been seeming this problem in the last few webkit builds but this crash that happened was encountered with Webkit Nightly  r151221.
Comment 2 Brady Eidson 2013-06-05 16:10:30 PDT
You forgot to attach the crash log info!  :)
Comment 3 Chris Petersen 2013-06-05 16:12:39 PDT
Created attachment 203892 [details]
Crash log.txt

Added crash log for real..
Comment 4 Chris Petersen 2013-06-05 16:13:14 PDT
Oops. It's there now.
Comment 5 Brady Eidson 2013-06-05 16:20:57 PDT
We have this in radar - <rdar://problem/14052886>

We have steps to reproduce there, but may only be applicable internally.
Comment 6 Chris Petersen 2013-06-06 12:16:08 PDT
Sweet.... I finally have reproducible steps. It's timing based for me but at least I have confidence I can reproduce it in the latest Webkit Nightly build : r151260

1) Launch Webkit Nightly r151260 on a clean install
2) After default webkit page loads ( http://nightly.webkit.org/start/trunk/151260 ), type www.macnn.com. Press return key
3) After Macnn page loads, click the back button so that it navigates back
4) IMPORTANT: After webkit page displays, click forward then back button multiple times ( 5 -7 ) in row so you switch between these two page in quick succession  ( so that progress indicator in Address bar NEVER finishes loading either page )
Comment 7 Brady Eidson 2013-06-07 11:39:46 PDT
Easy to reproduce this rapidly refreshing espn.go.com  (Just hold cmd-R)
Comment 8 Brady Eidson 2013-06-07 12:05:33 PDT
A null-check of document will be the fix.

I have a reduction that can reproduce this 100% reliably, and it's good enough to be a layout test.

The reduction is basically a long-loading page (main resource never finishes loading) that is waiting for an external script to load (long running script load that never finishes loading), and then refresh it once.
Comment 9 Brady Eidson 2013-06-07 13:48:07 PDT
Created attachment 204065 [details]
Patch v1 - Fix + test
Comment 10 Brady Eidson 2013-06-07 13:53:13 PDT
http://trac.webkit.org/changeset/151335
Comment 11 Lucas Forschler 2013-06-07 14:29:35 PDT
<rdar://problem/14052886>
Comment 12 Chris Petersen 2013-06-08 08:01:00 PDT
Verified fixed in Webkit NB r151344 on Mac OS X 10.8.3.
Comment 13 Chris Petersen 2013-06-08 08:01:26 PDT
Closing