Bug 215118 - REGRESSION (r265019): ASSERTION FAILED: !m_impl || m_impl->wasConstructedOnMainThread() == isMainThread() under WebCore::PlaybackSessionInterfaceAVKit::invalidate()
Summary: REGRESSION (r265019): ASSERTION FAILED: !m_impl || m_impl->wasConstructedOnMa...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Peng Liu
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-08-03 20:53 PDT by Ryan Haddad
Modified: 2020-08-04 13:45 PDT (History)
5 users (show)

See Also:


Attachments
Patch (2.95 KB, patch)
2020-08-04 11:57 PDT, Peng Liu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Haddad 2020-08-03 20:53:52 PDT
Seeing the following assertion failure on iOS Debug bots:

    TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS
        MRMediaRemoteSetNowPlayingApplicationPlaybackStateForOrigin(playing) failed with error 3
        MRMediaRemoteSetNowPlayingApplicationPlaybackStateForOrigin(playing) failed with error 3
        2020-08-03 20:26:24.950 TestWebKitAPI[94363:465451690] *** Warning: <AVPlayerViewController: 0x7fa59404b400> is trying to enter full screen, but is not in its view's window's view controller hierarchy. This results in undefined behavior.
        MRMediaRemoteSetNowPlayingApplicationPlaybackStateForOrigin(stopped) failed with error 3
        ASSERTION FAILED: !m_impl || m_impl->wasConstructedOnMainThread() == isMainThread()
        /Volumes/Data/slave/ios-simulator-13-debug/build/WebKitBuild/Debug-iphonesimulator/usr/local/include/wtf/WeakPtr.h(107) : T *WTF::WeakPtr<WebCore::PlaybackSessionModel, WTF::EmptyCounter>::operator->() const [T = WebCore::PlaybackSessionModel, Counter = WTF::EmptyCounter]
        1   0x1117c58a9 WTFCrash
        2   0x128ee5abb WTFCrashWithInfo(int, char const*, char const*, int)
        3   0x129386999 WTF::WeakPtr<WebCore::PlaybackSessionModel, WTF::EmptyCounter>::operator->() const
        4   0x129385890 WebCore::PlaybackSessionInterfaceAVKit::invalidate()
        5   0x1293857bd WebCore::PlaybackSessionInterfaceAVKit::~PlaybackSessionInterfaceAVKit()
        6   0x1293858e5 WebCore::PlaybackSessionInterfaceAVKit::~PlaybackSessionInterfaceAVKit()
        7   0x12938590c WebCore::PlaybackSessionInterfaceAVKit::~PlaybackSessionInterfaceAVKit()
        8   0x12da1561f std::__1::default_delete<WebCore::PlaybackSessionInterfaceAVKit>::operator()(WebCore::PlaybackSessionInterfaceAVKit*) const
        9   0x12da155e2 WTF::RefCounted<WebCore::PlaybackSessionInterfaceAVKit, std::__1::default_delete<WebCore::PlaybackSessionInterfaceAVKit> >::deref() const
        10  0x12da15575 WTF::Ref<WebCore::PlaybackSessionInterfaceAVKit, WTF::DumbPtrTraits<WebCore::PlaybackSessionInterfaceAVKit> >::~Ref()
        11  0x12da0df25 WTF::Ref<WebCore::PlaybackSessionInterfaceAVKit, WTF::DumbPtrTraits<WebCore::PlaybackSessionInterfaceAVKit> >::~Ref()
        12  0x12da0e15d WebCore::VideoFullscreenInterfaceAVKit::~VideoFullscreenInterfaceAVKit()
        13  0x12da0e375 WebCore::VideoFullscreenInterfaceAVKit::~VideoFullscreenInterfaceAVKit()
        14  0x12da0e3bc WebCore::VideoFullscreenInterfaceAVKit::~VideoFullscreenInterfaceAVKit()
        15  0x12da15ac4 WTF::ThreadSafeRefCounted<WebCore::VideoFullscreenInterfaceAVKit, (WTF::DestructionThread)2>::deref() const::'lambda'()::operator()() const
        16  0x12da15a17 WTF::ThreadSafeRefCounted<WebCore::VideoFullscreenInterfaceAVKit, (WTF::DestructionThread)2>::deref() const
        17  0x12da15947 void WTF::derefIfNotNull<WebCore::VideoFullscreenInterfaceAVKit>(WebCore::VideoFullscreenInterfaceAVKit*)
        18  0x12da15909 WTF::RefPtr<WebCore::VideoFullscreenInterfaceAVKit, WTF::DumbPtrTraits<WebCore::VideoFullscreenInterfaceAVKit> >::~RefPtr()
        19  0x12da0c405 WTF::RefPtr<WebCore::VideoFullscreenInterfaceAVKit, WTF::DumbPtrTraits<WebCore::VideoFullscreenInterfaceAVKit> >::~RefPtr()
        20  0x12da0c3e5 -[WebAVPlayerLayer .cxx_destruct]
        21  0x11bc41d0c object_cxxDestructFromClass(objc_object*, objc_class*)
        22  0x11bc52465 objc_destructInstance
        23  0x11bc58296 -[NSObject dealloc]
        24  0x11b189877 -[CALayer dealloc]
        25  0x12da0a555 -[WebAVPlayerLayer dealloc]
        26  0x11b6a5eed __delayedPerformCleanup
        27  0x11bde3849 CFRunLoopTimerInvalidate
        28  0x11bde50c8 __CFRunLoopDoTimer
        29  0x11bde46ea __CFRunLoopDoTimers
        30  0x11bddf33e __CFRunLoopRun
        31  0x11bdde884 CFRunLoopRunSpecific
        Child process terminated with signal 11: Segmentation fault

https://results.webkit.org/?suite=api-tests&test=TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS
Comment 1 Radar WebKit Bug Importer 2020-08-03 20:54:17 PDT
<rdar://problem/66506111>
Comment 2 Ryan Haddad 2020-08-03 20:57:57 PDT
Test history suggests that this was caused by https://trac.webkit.org/changeset/265019
Comment 3 Peng Liu 2020-08-04 11:57:10 PDT
Created attachment 405934 [details]
Patch
Comment 4 EWS 2020-08-04 13:45:23 PDT
Committed r265257: <https://trac.webkit.org/changeset/265257>

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