Bug 48561

Summary: Assertion failure in DocumentLoader::commitData when loading a media document in WebKit2
Product: WebKit Reporter: Adam Roben (:aroben) <aroben>
Component: Page LoadingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, sam, webkit.review.bot
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Cancel main resource loads after we hand them off to the media engine eric.carlson: review+

Description Adam Roben (:aroben) 2010-10-28 13:54:24 PDT
This is the WebKit2 equivalent of bug 48531.


To reproduce:

1. Go to http://www.nch.com.au/acm/sample.wav in a debug build

You'll hit an assertion in DocumentLoader::commitData:

    ASSERT(m_frame->document()->parsing());

The wav file seems to load fine in Release builds.

Here's the backtrace:

>	WebKit.dll!WebCore::DocumentLoader::commitData(const char * bytes=0x0524f010, int length=67868)  Line 306 + 0x35 bytes	C++
 	WebKit.dll!WebKit::WebFrameLoaderClient::committedLoad(WebCore::DocumentLoader * loader=0x020d95b8, const char * data=0x0524f010, int length=67868)  Line 681	C++
 	WebKit.dll!WebCore::DocumentLoader::commitLoad(const char * data=0x0524f010, int length=67868)  Line 292 + 0x29 bytes	C++
 	WebKit.dll!WebCore::DocumentLoader::receivedData(const char * data=0x0524f010, int length=67868)  Line 320	C++
 	WebKit.dll!WebCore::MainResourceLoader::addData(const char * data=0x0524f010, int length=67868, bool allAtOnce=false)  Line 157	C++
 	WebKit.dll!WebCore::ResourceLoader::didReceiveData(const char * data=0x0524f010, int length=67868, __int64 lengthReceived=67868, bool allAtOnce=false)  Line 262 + 0x1b bytes	C++
 	WebKit.dll!WebCore::MainResourceLoader::didReceiveData(const char * data=0x0524f010, int length=67868, __int64 lengthReceived=67868, bool allAtOnce=false)  Line 437	C++
 	WebKit.dll!WebCore::ResourceLoader::didReceiveData(WebCore::ResourceHandle * __formal=0x02052460, const char * data=0x0524f010, int length=67868, int lengthReceived=67868)  Line 415 + 0x1f bytes	C++
 	WebKit.dll!WebCore::didReceiveData(_CFURLConnection * conn=0x020e2d88, const __CFData * data=0x0523d348, long originalLength=67868, const void * clientInfo=0x02052460)  Line 214 + 0x2a bytes	C++
 	CFNetwork.dll!URLConnectionClient::_clientDidReceiveData()

Note that on Mac you'll instead hit a crash (bug 48559), but if that crash didn't happen this would.
Comment 1 Adam Roben (:aroben) 2010-10-28 13:54:53 PDT
<rdar://problem/8606679>
Comment 2 Adam Roben (:aroben) 2010-11-01 09:24:49 PDT
Created attachment 72516 [details]
Cancel main resource loads after we hand them off to the media engine
Comment 3 WebKit Review Bot 2010-11-01 09:27:18 PDT
Attachment 72516 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebKit2/WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:174:  Line contains tab character.  [whitespace/tab] [5]
Total errors found: 1 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Eric Carlson 2010-11-01 09:40:25 PDT
Comment on attachment 72516 [details]
Cancel main resource loads after we hand them off to the media engine

View in context: https://bugs.webkit.org/attachment.cgi?id=72516&action=review

> WebKit2/WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp:93
> +ResourceError pluginWillHandleLoadError(const ResourceResponse&)
> +{
> +    notImplemented();
> +    return ResourceError();
> +}

Might be worth filing a bug about this.
Comment 5 Adam Roben (:aroben) 2010-11-01 09:44:42 PDT
Comment on attachment 72516 [details]
Cancel main resource loads after we hand them off to the media engine

View in context: https://bugs.webkit.org/attachment.cgi?id=72516&action=review

>> WebKit2/WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp:93
>> +}
> 
> Might be worth filing a bug about this.

Filed bug 48764.
Comment 6 Adam Roben (:aroben) 2010-11-01 09:52:24 PDT
Committed r71033: <http://trac.webkit.org/changeset/71033>