Bug 218722

Summary: REGRESSION (r269557): ASSERTION FAILED: Completion handler should always be called under WebCore::HTMLMediaElement::exitFullscreen
Product: WebKit Reporter: Ryan Haddad <ryanhaddad>
Component: MediaAssignee: Peng Liu <peng.liu6>
Status: RESOLVED FIXED    
Severity: Normal CC: eric.carlson, ews-watchlist, glenn, jer.noble, peng.liu6, philipj, ryanhaddad, sergio, webkit-bot-watchers-bugzilla, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=218419
Attachments:
Description Flags
Patch none

Description Ryan Haddad 2020-11-09 13:34:02 PST
Seeing the following assertion failure with media/element-containing-pip-video-going-into-fullscreen.html macOS debug bots after https://trac.webkit.org/changeset/269557/webkit:

ASSERTION FAILED: Completion handler should always be called
!m_function
/Volumes/Data/slave/catalina-debug/build/WebKitBuild/Debug/usr/local/include/wtf/CompletionHandler.h(58) : WTF::CompletionHandler<void (bool)>::~CompletionHandler()
1   0x7cecbff29 WTFCrash
2   0x7ae97cdb7 WTF::CompletionHandler<void (bool)>::~CompletionHandler()
3   0x7ae96ad25 WTF::CompletionHandler<void (bool)>::~CompletionHandler()
4   0x7b1973601 WebCore::HTMLMediaElement::exitFullscreen()
5   0x7b1a52f77 WebCore::HTMLVideoElement::setPresentationMode(WebCore::HTMLVideoElement::VideoPresentationMode)
6   0x7b007656f WebCore::VideoFullscreenModelVideoElement::fullscreenModeChanged(unsigned int)
7   0x7a16aad6a WebKit::VideoFullscreenManager::fullscreenModeChanged(WTF::ObjectIdentifier<WebKit::PlaybackSessionContextIdentifierType>, unsigned int)
8   0x7a1a907ab void IPC::callMemberFunctionImpl<WebKit::VideoFullscreenManager, void (WebKit::VideoFullscreenManager::*)(WTF::ObjectIdentifier<WebKit::PlaybackSessionContextIdentifierType>, unsigned int), std::__1::tuple<WTF::ObjectIdentifier<WebKit::PlaybackSessionContextIdentifierType>, unsigned int>, 0ul, 1ul>(WebKit::VideoFullscreenManager*, void (WebKit::VideoFullscreenManager::*)(WTF::ObjectIdentifier<WebKit::PlaybackSessionContextIdentifierType>, unsigned int), std::__1::tuple<WTF::ObjectIdentifier<WebKit::PlaybackSessionContextIdentifierType>, unsigned int>&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul>)
9   0x7a1a8fd40 void IPC::callMemberFunction<WebKit::VideoFullscreenManager, void (WebKit::VideoFullscreenManager::*)(WTF::ObjectIdentifier<WebKit::PlaybackSessionContextIdentifierType>, unsigned int), std::__1::tuple<WTF::ObjectIdentifier<WebKit::PlaybackSessionContextIdentifierType>, unsigned int>, std::__1::integer_sequence<unsigned long, 0ul, 1ul> >(std::__1::tuple<WTF::ObjectIdentifier<WebKit::PlaybackSessionContextIdentifierType>, unsigned int>&&, WebKit::VideoFullscreenManager*, void (WebKit::VideoFullscreenManager::*)(WTF::ObjectIdentifier<WebKit::PlaybackSessionContextIdentifierType>, unsigned int))
10  0x7a1a8b216 void IPC::handleMessage<Messages::VideoFullscreenManager::FullscreenModeChanged, WebKit::VideoFullscreenManager, void (WebKit::VideoFullscreenManager::*)(WTF::ObjectIdentifier<WebKit::PlaybackSessionContextIdentifierType>, unsigned int)>(IPC::Decoder&, WebKit::VideoFullscreenManager*, void (WebKit::VideoFullscreenManager::*)(WTF::ObjectIdentifier<WebKit::PlaybackSessionContextIdentifierType>, unsigned int))
11  0x7a1a8a910 WebKit::VideoFullscreenManager::didReceiveMessage(IPC::Connection&, IPC::Decoder&)
12  0x7a0458dd1 IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&)
13  0x7a16e71f7 WebKit::WebProcess::didReceiveMessage(IPC::Connection&, IPC::Decoder&)
14  0x7a0075faa IPC::Connection::dispatchMessage(IPC::Decoder&)
15  0x7a0077090 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)
16  0x7a0077720 IPC::Connection::dispatchOneIncomingMessage()
17  0x7a0098478 IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_8::operator()()
18  0x7a009838e WTF::Detail::CallableWrapper<IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_8, void>::call()
19  0x7ceceb792 WTF::Function<void ()>::operator()() const
20  0x7ced6a7e5 WTF::RunLoop::performWork()
21  0x7ced6ee71 WTF::RunLoop::performWork(void*)
22  0x7fff35035d52 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
23  0x7fff35035cf1 __CFRunLoopDoSource0
24  0x7fff35035b0b __CFRunLoopDoSources0
25  0x7fff3503483a __CFRunLoopRun
26  0x7fff35033e3e CFRunLoopRunSpecific
27  0x7fff376cf1c8 -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
28  0x7fff37781c6f -[NSRunLoop(NSRunLoop) run]
29  0x7fff6f2ee4ea _xpc_objc_main.cold.4
30  0x7fff6f2ee430 _xpc_objc_main
31  0x7fff6f2edf63 _xpc_copy_xpcservice_dictionary
LEAK: 1 WebPageProxy

https://results.webkit.org/?suite=layout-tests&test=media%2Felement-containing-pip-video-going-into-fullscreen.html
Comment 1 Radar WebKit Bug Importer 2020-11-09 13:34:42 PST
<rdar://problem/71208005>
Comment 2 Peng Liu 2020-11-09 13:58:56 PST
Created attachment 413629 [details]
Patch
Comment 3 EWS 2020-11-09 15:48:35 PST
Committed r269610: <https://trac.webkit.org/changeset/269610>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 413629 [details].