Bug 225371

Summary: REGRESSION (r276870): ASSERTION FAILED: !m_impl || !m_shouldEnableAssertions || m_impl->wasConstructedOnMainThread() == isMainThread() under WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer
Product: WebKit Reporter: Ryan Haddad <ryanhaddad>
Component: MediaAssignee: Jer Noble <jer.noble>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, eric.carlson, ews-watchlist, glenn, jer.noble, philipj, 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=225254
https://bugs.webkit.org/show_bug.cgi?id=225492
Attachments:
Description Flags
Patch
none
Patch none

Description Ryan Haddad 2021-05-04 16:34:15 PDT
The following API tests are asserting on iOS Simulator bots:

TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS
TestWebKitAPI.WebKitLegacy.PreemptVideoFullscreen
TestWebKitAPI.WebKitLegacy.ScrollingDoesNotPauseMedia


        ASSERTION FAILED: !m_impl || !m_shouldEnableAssertions || m_impl->wasConstructedOnMainThread() == isMainThread()
        /Volumes/Data/worker/ios-simulator-14-debug/build/WebKitBuild/Debug-iphonesimulator/usr/local/include/wtf/WeakPtr.h(109) : T *WTF::WeakPtr<WebCore::MediaPlayerPrivateAVFoundationObjC, WTF::EmptyCounter>::operator->() const [T = WebCore::MediaPlayerPrivateAVFoundationObjC, Counter = WTF::EmptyCounter]
        1   0x1140a40b9 WTFCrash
        2   0x12c35128b WTFCrashWithInfo(int, char const*, char const*, int)
        3   0x12c436287 WTF::WeakPtr<WebCore::MediaPlayerPrivateAVFoundationObjC, WTF::EmptyCounter>::operator->() const
        4   0x12c7620aa WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer()::$_4::operator()(CMTime) const
        5   0x12c762069 invocation function for block in WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer()
        6   0x16598cd13 -[AVPeriodicTimebaseObserver _effectiveRateChanged]
        7   0x16598e0d9 __AVTimebaseObserver_timebaseNotificationCallback_block_invoke
        8   0x1128d732f _dispatch_call_block_and_release
        9   0x1128d8508 _dispatch_client_callout
        10  0x1128e4ff7 _dispatch_main_queue_callback_4CF
        11  0x11163adab __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
        12  0x11163562e __CFRunLoopRun
        13  0x1116346c6 CFRunLoopRunSpecific
        14  0x1110227b9 -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
        15  0x10c42b0de TestWebKitAPI::Util::run(bool*)
        16  0x10bbe1fad TestWebKitAPI::WebKitLegacy_AudioSessionCategoryIOS_Test::TestBody()
        17  0x10c5e6bf4 void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*)
        18  0x10c5bd46b void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*)
        19  0x10c5bd3a3 testing::Test::Run()
        20  0x10c5be0e4 testing::TestInfo::Run()
        21  0x10c5bf205 testing::TestSuite::Run()
        22  0x10c5cda6a testing::internal::UnitTestImpl::RunAllTests()
        23  0x10c5eb4d4 bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*)
        24  0x10c5cd42b bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*)
        25  0x10c5cd2fd testing::UnitTest::Run()
        26  0x10c3d35f1 RUN_ALL_TESTS()
        27  0x10c3d3582 TestWebKitAPI::TestsController::run(int, char**)
        28  0x10c58f1c5 main
        29  0x112961409 start
        Child process terminated with signal 11: Segmentation fault


https://results.webkit.org/?suite=api-tests&suite=api-tests&suite=api-tests&test=TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS&test=TestWebKitAPI.WebKitLegacy.PreemptVideoFullscreen&test=TestWebKitAPI.WebKitLegacy.ScrollingDoesNotPauseMedia
Comment 1 Radar WebKit Bug Importer 2021-05-04 16:34:59 PDT
<rdar://problem/77531907>
Comment 2 Jer Noble 2021-05-04 17:06:51 PDT
Looks like a webThread vs. mainThread problem. :-/
Comment 3 Jer Noble 2021-05-04 21:00:20 PDT
Created attachment 427730 [details]
Patch
Comment 4 Jer Noble 2021-05-05 16:42:33 PDT
Created attachment 427819 [details]
Patch
Comment 5 EWS 2021-05-06 14:17:01 PDT
Committed r277122 (237418@main): <https://commits.webkit.org/237418@main>

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