Bug 182527 - [iOS] media tests failing ASSERT_NOT_REACHED() in WebCore::VideoFullscreenInterfaceAVKit::cleanupFullscreen()
Summary: [iOS] media tests failing ASSERT_NOT_REACHED() in WebCore::VideoFullscreenInt...
Status: RESOLVED DUPLICATE of bug 186945
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Eric Carlson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-02-05 22:05 PST by Ryan Haddad
Modified: 2018-07-03 14:02 PDT (History)
5 users (show)

See Also:


Attachments
Remove another assert. (1.61 KB, patch)
2018-02-12 10:45 PST, Ryan Haddad
ap: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Haddad 2018-02-05 22:05:22 PST
The following LayoutTests are failing one of the assertions added in https://trac.webkit.org/changeset/228115/webkit

media/media-fullscreen-loop-inline.html
media/media-higher-prio-audio-stream.html
media/video-background-playback.html


-[AVPlayerViewController exitFullScreenAnimated:completionHandler:] failed with error View needs to be loaded before you can call -[AVPlayerViewController (0x7ff563005200) exitFullScreenAnimated:completionHandler:]!
SHOULD NEVER BE REACHED
/Volumes/Data/slave/ios-simulator-11-debug/build/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm(817) : auto WebCore::VideoFullscreenInterfaceAVKit::cleanupFullscreen()::(anonymous class)::operator()(BOOL, NSError *) const
1   0x10cac058d WTFCrash
2   0x11a6b3c86 WebCore::VideoFullscreenInterfaceAVKit::cleanupFullscreen()::$_5::operator()(bool, NSError*) const
3   0x11a6b3c01 invocation function for block in WebCore::VideoFullscreenInterfaceAVKit::cleanupFullscreen()
4   0x13171e444 -[AVPlayerViewController(AVPlayerViewController_WebKitOnly) exitFullScreenAnimated:completionHandler:]
5   0x11a6b3a3e WebCore::VideoFullscreenInterfaceAVKit::cleanupFullscreen()
6   0x1116d3b55 WebKit::VideoFullscreenManagerProxy::cleanupFullscreen(unsigned long long)
7   0x1116e49cd void IPC::callMemberFunctionImpl<WebKit::VideoFullscreenManagerProxy, void (WebKit::VideoFullscreenManagerProxy::*)(unsigned long long), std::__1::tuple<unsigned long long>, 0ul>(WebKit::VideoFullscreenManagerProxy*, void (WebKit::VideoFullscreenManagerProxy::*)(unsigned long long), std::__1::tuple<unsigned long long>&&, std::__1::integer_sequence<unsigned long, 0ul>)
8   0x1116e4920 void IPC::callMemberFunction<WebKit::VideoFullscreenManagerProxy, void (WebKit::VideoFullscreenManagerProxy::*)(unsigned long long), std::__1::tuple<unsigned long long>, std::__1::integer_sequence<unsigned long, 0ul> >(std::__1::tuple<unsigned long long>&&, WebKit::VideoFullscreenManagerProxy*, void (WebKit::VideoFullscreenManagerProxy::*)(unsigned long long))
9   0x1116e3d40 void IPC::handleMessage<Messages::VideoFullscreenManagerProxy::CleanupFullscreen, WebKit::VideoFullscreenManagerProxy, void (WebKit::VideoFullscreenManagerProxy::*)(unsigned long long)>(IPC::Decoder&, WebKit::VideoFullscreenManagerProxy*, void (WebKit::VideoFullscreenManagerProxy::*)(unsigned long long))
10  0x1116e33ae WebKit::VideoFullscreenManagerProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&)
11  0x1112c4018 IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&)
12  0x1111b4584 WebKit::ChildProcessProxy::dispatchMessage(IPC::Connection&, IPC::Decoder&)
13  0x111c4396a WebKit::WebProcessProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&)
14  0x111c43a64 non-virtual thunk to WebKit::WebProcessProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&)
15  0x1111c3ab3 IPC::Connection::dispatchMessage(IPC::Decoder&)
16  0x1111b96d8 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)
17  0x1111c40ba IPC::Connection::dispatchOneMessage()
18  0x1111dbedd IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_14::operator()()
19  0x1111dbe39 WTF::Function<void ()>::CallableWrapper<IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_14>::call()
20  0x10cadc81b WTF::Function<void ()>::operator()() const
21  0x10cb1fe93 WTF::RunLoop::performWork()
22  0x10cb206f4 WTF::RunLoop::performWork(void*)
23  0x1151ba2b1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
24  0x115259d31 __CFRunLoopDoSource0
25  0x11519ec19 __CFRunLoopDoSources0
26  0x11519e1ff __CFRunLoopRun
27  0x11519da89 CFRunLoopRunSpecific
28  0x10aeaae5e -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
29  0x109522c24 WTR::TestController::platformRunUntil(bool&, double)
30  0x1094fd389 WTR::TestController::runUntil(bool&, double)
31  0x10952652a WTR::TestInvocation::invoke()
LEAK: 1 WebFrame
LEAK: 75 RenderObject

https://build.webkit.org/results/Apple%20iOS%2011%20Simulator%20Debug%20WK2%20(Tests)/r228150%20(2549)/results.html
Comment 1 Ryan Haddad 2018-02-05 22:08:02 PST
This appears to be 100% reproducible on iOS Debug bots.
Comment 2 Radar WebKit Bug Importer 2018-02-06 09:37:41 PST
<rdar://problem/37277469>
Comment 3 Ryan Haddad 2018-02-06 15:28:01 PST
This also affects an API test on iOS:

UNEXPECTEDLY EXITED WebKitLegacy.AudioSessionCategoryIOS
2018-02-06 14:51:05.313 TestWebKitAPI[57966:71952567] *** Warning: <AVPlayerViewController: 0x7faa2c004c00> is trying to enter full screen, but is not in its view's window's view controller hierarchy. This results in undefined behavior.
2018-02-06 14:51:05.314 TestWebKitAPI[57966:71952567] Presenting view controllers on detached view controllers is discouraged <AVPlayerViewController: 0x7faa2c004c00>.
2018-02-06 14:51:05.354 TestWebKitAPI[57966:71952567] *** Warning: <AVPlayerViewController: 0x7faa2c004c00> is trying to exit full screen, but is not in its view's window's view controller hierarchy. This results in undefined behavior.
-[AVPlayerViewController exitFullScreenAnimated:completionHandler:] failed with error Invalid call of -[AVPlayerViewController (0x7faa2c004c00) _transitionFromFullScreenAnimated:completionHandler:]!
SHOULD NEVER BE REACHED
/Volumes/Data/slave/ios-simulator-11-debug/build/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm(779) : auto WebCore::VideoFullscreenInterfaceAVKit::exitFullscreen(const WebCore::IntRect &)::(anonymous class)::operator()(BOOL, NSError *)
1   0x10f25953d WTFCrash
2   0x11b24a5d9 WebCore::VideoFullscreenInterfaceAVKit::exitFullscreen(WebCore::IntRect const&)::$_4::operator()(bool, NSError*)
3   0x11b24a541 ___ZN7WebCore29VideoFullscreenInterfaceAVKit14exitFullscreenERKNS_7IntRectE_block_invoke.288
4   0x14372c114 -[AVPlayerViewController _transitionFromFullScreenAnimated:completionHandler:]
5   0x14372f4ed -[AVPlayerViewController(AVPlayerViewController_WebKitOnly) exitFullScreenAnimated:completionHandler:]
6   0x11b24a2e6 WebCore::VideoFullscreenInterfaceAVKit::exitFullscreen(WebCore::IntRect const&)
7   0x11896b09c VideoFullscreenControllerContext::exitFullscreen()::$_39::operator()() const
8   0x11896b019 invocation function for block in VideoFullscreenControllerContext::exitFullscreen()
9   0x117d0f273 _dispatch_call_block_and_release
10  0x117d102b5 _dispatch_client_callout
11  0x117d1a496 _dispatch_main_queue_callback_4CF
12  0x127c18ef9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
13  0x127bdd662 __CFRunLoopRun
14  0x127bdca89 CFRunLoopRunSpecific
15  0x116deae5e -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
16  0x10da9c353 TestWebKitAPI::Util::run(bool*)
17  0x10d817493 TestWebKitAPI::WebKitLegacy_AudioSessionCategoryIOS_Test::TestBody()
18  0x10db4caaa testing::Test::Run()
19  0x10db4d56d testing::internal::TestInfoImpl::Run()
20  0x10db4e5bd testing::TestCase::Run()
21  0x10db5463b testing::internal::UnitTestImpl::RunAllTests()
22  0x10db542b9 testing::UnitTest::Run()
23  0x10da260ac TestWebKitAPI::TestsController::run(int, char**)
24  0x10db21d90 main
25  0x117d84d81 start

https://build.webkit.org/builders/Apple%20iOS%2011%20Simulator%20Debug%20WK2%20%28Tests%29/builds/2564
Comment 4 Matt Lewis 2018-02-07 10:14:09 PST
Spoke with Eric in person. We decided to remove the asserts temporarily but leave in the logging until he could look at it.

https://trac.webkit.org/changeset/228229/webkit
Comment 5 Ryan Haddad 2018-02-12 10:45:11 PST
Created attachment 333607 [details]
Remove another assert.
Comment 6 Ryan Haddad 2018-02-12 12:32:05 PST
Committed https://trac.webkit.org/r228389
Comment 7 Ryan Haddad 2018-07-03 14:02:15 PDT

*** This bug has been marked as a duplicate of bug 186945 ***