Bug 162307

Summary: REGRESSION(r206127): ASSERTION FAILED: !isClosed() in WebCore::MediaSource::detachFromElement
Product: WebKit Reporter: Ryan Haddad <ryanhaddad>
Component: New BugsAssignee: Jer Noble <jer.noble>
Status: RESOLVED FIXED    
Severity: Normal CC: eric.carlson, jer.noble
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch eric.carlson: review+

Description Ryan Haddad 2016-09-20 11:00:20 PDT
Crash is attributed to LayoutTest fast/history/page-cache-notification-non-suspendable.html, but the crashlog points to fast/history/page-cache-media-source-opened.html

https://build.webkit.org/results/Apple%20El%20Capitan%20Debug%20WK2%20(Tests)/r206148%20(8282)/results.html

ASSERTION FAILED: !isClosed()
/Volumes/Data/slave/elcapitan-debug/build/Source/WebCore/Modules/mediasource/MediaSource.cpp(894) : void WebCore::MediaSource::detachFromElement(WebCore::HTMLMediaElement &)
1   0x10a3e0330 WTFCrash
2   0x10e2ed635 WebCore::MediaSource::detachFromElement(WebCore::HTMLMediaElement&)
3   0x10d4dc3d5 WebCore::HTMLMediaElement::detachMediaSource()
4   0x10e2eda0a WebCore::MediaSource::stop()
5   0x10e2eda4c non-virtual thunk to WebCore::MediaSource::stop()
6   0x10e9b95e2 WebCore::ScriptExecutionContext::stopActiveDOMObjects()
7   0x10cf4c425 WebCore::Document::stopActiveDOMObjects()
8   0x10cf4129e WebCore::Document::prepareForDestruction()
9   0x10d2bedd0 WebCore::Frame::setView(WTF::RefPtr<WebCore::FrameView>&&)
10  0x10d2c1088 WebCore::Frame::createView(WebCore::IntSize const&, WebCore::Color const&, bool, WebCore::IntSize const&, WebCore::IntRect const&, bool, WebCore::ScrollbarMode, bool, WebCore::ScrollbarMode, bool)
11  0x106138802 WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage()
12  0x10d2d3a91 WebCore::FrameLoader::transitionToCommitted(WebCore::CachedPage*)
13  0x10d2d2ab2 WebCore::FrameLoader::commitProvisionalLoad()
14  0x10cfca8bc WebCore::DocumentLoader::commitIfReady()
15  0x10cfcabdd WebCore::DocumentLoader::finishedLoading(double)
16  0x10cfd088d WebCore::DocumentLoader::maybeLoadEmpty()
17  0x10cfd0a1f WebCore::DocumentLoader::startLoadingMainResource()
18  0x10d2d5359 WebCore::FrameLoader::continueLoadAfterWillSubmitForm()
19  0x10d2d0ee2 WebCore::FrameLoader::continueLoadAfterNavigationPolicy(WebCore::ResourceRequest const&, WTF::PassRefPtr<WebCore::FormState>, bool, WebCore::AllowNavigationToInvalidURL)
20  0x10d2df4fe WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::PassRefPtr<WebCore::FormState>, WebCore::AllowNavigationToInvalidURL)::$_4::operator()(WebCore::ResourceRequest const&, WTF::PassRefPtr<WebCore::FormState>, bool) const
21  0x10d2df480 void std::__1::__invoke_void_return_wrapper<void>::__call<WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::PassRefPtr<WebCore::FormState>, WebCore::AllowNavigationToInvalidURL)::$_4&, WebCore::ResourceRequest const&, WTF::PassRefPtr<WebCore::FormState>, bool>(WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::PassRefPtr<WebCore::FormState>, WebCore::AllowNavigationToInvalidURL)::$_4&&&, WebCore::ResourceRequest const&&&, WTF::PassRefPtr<WebCore::FormState>&&, bool&&)
22  0x10d2df37c std::__1::__function::__func<WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::PassRefPtr<WebCore::FormState>, WebCore::AllowNavigationToInvalidURL)::$_4, std::__1::allocator<WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::PassRefPtr<WebCore::FormState>, WebCore::AllowNavigationToInvalidURL)::$_4>, void (WebCore::ResourceRequest const&, WTF::PassRefPtr<WebCore::FormState>, bool)>::operator()(WebCore::ResourceRequest const&, WTF::PassRefPtr<WebCore::FormState>&&, bool&&)
23  0x10e4f0357 std::__1::function<void (WebCore::ResourceRequest const&, WTF::PassRefPtr<WebCore::FormState>, bool)>::operator()(WebCore::ResourceRequest const&, WTF::PassRefPtr<WebCore::FormState>, bool) const
24  0x10e4ef8d9 WebCore::PolicyCallback::call(bool)
25  0x10e4f11ec WebCore::PolicyChecker::continueAfterNavigationPolicy(WebCore::PolicyAction)
26  0x10e4f47de WebCore::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest const&, bool, WebCore::DocumentLoader*, WTF::PassRefPtr<WebCore::FormState>, std::__1::function<void (WebCore::ResourceRequest const&, WTF::PassRefPtr<WebCore::FormState>, bool)>)::$_1::operator()(WebCore::PolicyAction) const
27  0x10e4f47af void std::__1::__invoke_void_return_wrapper<void>::__call<WebCore::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest const&, bool, WebCore::DocumentLoader*, WTF::PassRefPtr<WebCore::FormState>, std::__1::function<void (WebCore::ResourceRequest const&, WTF::PassRefPtr<WebCore::FormState>, bool)>)::$_1&, WebCore::PolicyAction>(WebCore::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest const&, bool, WebCore::DocumentLoader*, WTF::PassRefPtr<WebCore::FormState>, std::__1::function<void (WebCore::ResourceRequest const&, WTF::PassRefPtr<WebCore::FormState>, bool)>)::$_1&&&, WebCore::PolicyAction&&)
28  0x10e4f472c std::__1::__function::__func<WebCore::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest const&, bool, WebCore::DocumentLoader*, WTF::PassRefPtr<WebCore::FormState>, std::__1::function<void (WebCore::ResourceRequest const&, WTF::PassRefPtr<WebCore::FormState>, bool)>)::$_1, std::__1::allocator<WebCore::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest const&, bool, WebCore::DocumentLoader*, WTF::PassRefPtr<WebCore::FormState>, std::__1::function<void (WebCore::ResourceRequest const&, WTF::PassRefPtr<WebCore::FormState>, bool)>)::$_1>, void (WebCore::PolicyAction)>::operator()(WebCore::PolicyAction&&)
29  0x10612e82c std::__1::function<void (WebCore::PolicyAction)>::operator()(WebCore::PolicyAction) const
30  0x106135856 WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction(WebCore::NavigationAction const&, WebCore::ResourceRequest const&, WTF::PassRefPtr<WebCore::FormState>, std::__1::function<void (WebCore::PolicyAction)>)
31  0x10e4f0dac WebCore::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest const&, bool, WebCore::DocumentLoader*, WTF::PassRefPtr<WebCore::FormState>, std::__1::function<void (WebCore::ResourceRequest const&, WTF::PassRefPtr<WebCore::FormState>, bool)>)
Comment 1 Ryan Haddad 2016-09-20 11:02:38 PDT
Started after https://trac.webkit.org/changeset/206127
Comment 2 Jer Noble 2016-09-21 08:37:13 PDT
Looks like this can happen if the MediaSource object is attached to a HTMLMediaElement, but hasn't yet been opened by a MediaSourcePrivate, which is a valid state. I'll just remove this ASSERT().
Comment 3 Jer Noble 2016-09-21 09:24:50 PDT
Created attachment 289459 [details]
Patch
Comment 4 Jer Noble 2016-09-21 09:27:49 PDT
Committed r206211: <http://trac.webkit.org/changeset/206211>