Bug 197382 - Make Document audio producers use WeakPtr
Summary: Make Document audio producers use WeakPtr
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on: 197436
Blocks:
  Show dependency treegraph
 
Reported: 2019-04-29 13:29 PDT by youenn fablet
Modified: 2019-04-30 17:13 PDT (History)
6 users (show)

See Also:


Attachments
Patch (7.79 KB, patch)
2019-04-29 13:30 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (7.43 KB, patch)
2019-04-29 16:37 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Relanding (7.33 KB, patch)
2019-04-30 15:20 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2019-04-29 13:29:08 PDT
Make Document audio producers use WeakPtr
Comment 1 youenn fablet 2019-04-29 13:30:47 PDT
Created attachment 368483 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2019-04-29 13:36:39 PDT
<rdar://problem/50309081>
Comment 3 youenn fablet 2019-04-29 16:37:01 PDT
Created attachment 368513 [details]
Patch
Comment 4 WebKit Commit Bot 2019-04-30 08:16:16 PDT
Comment on attachment 368513 [details]
Patch

Clearing flags on attachment: 368513

Committed r244773: <https://trac.webkit.org/changeset/244773>
Comment 5 WebKit Commit Bot 2019-04-30 08:16:17 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Shawn Roberts 2019-04-30 13:18:27 PDT
It appears that after changes in https://trac.webkit.org/changeset/244773 is causing several assertion failures on Debug testers

https://build.webkit.org/results/Apple%20iOS%2012%20Simulator%20Debug%20WK2%20(Tests)/r244775%20(3505)/results.html

https://build.webkit.org/results/Apple%20High%20Sierra%20Debug%20WK2%20(Tests)/r244776%20(7619)/results.html

Crash Log:
ASSERTION FAILED: !m_audioProducers.hasNullReferences()
./dom/Document.cpp(3929) : void WebCore::Document::updateIsPlayingMedia(uint64_t)
1   0x61d14be89 WTFCrash
2   0x621b8f59b WTFCrashWithInfo(int, char const*, char const*, int)
3   0x623ef330d WebCore::Document::updateIsPlayingMedia(unsigned long long)
4   0x623ef351e WebCore::Document::removeAudioProducer(WebCore::MediaProducer&)
5   0x623629063 WebCore::MediaStreamTrack::~MediaStreamTrack()
6   0x6236291e5 WebCore::MediaStreamTrack::~MediaStreamTrack()
7   0x623629289 WebCore::MediaStreamTrack::~MediaStreamTrack()

https://build.webkit.org/results/Apple%20iOS%2012%20Simulator%20Debug%20WK2%20(Tests)/r244775%20(3505)/imported/w3c/web-platform-tests/webrtc/RTCIceTransport-extension.https-crash-log.txt


Also an API failure on iOS Simulator Debug

TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS
        2019-04-30 10:52:49.866 TestWebKitAPI[48813:5640405] *** Warning: <AVPlayerViewController: 0x7fde72084800> is trying to enter full screen, but is not in its view's window's view controller hierarchy. This results in undefined behavior.
        2019-04-30 10:52:50.763 TestWebKitAPI[48813:5640405] *** Warning: <AVPlayerViewController: 0x7fde71042c00> is trying to enter full screen, but is not in its view's window's view controller hierarchy. This results in undefined behavior.
        >>>> frameSizeChanged = 4096
        >>>> frameSizeChanged = 4096
        2019-04-30 10:52:51.207 TestWebKitAPI[48813:5640405] *** Warning: <AVPlayerViewController: 0x7fde718b9c00> is trying to enter full screen, but is not in its view's window's view controller hierarchy. This results in undefined behavior.
        2019-04-30 10:52:51.682 TestWebKitAPI[48813:5640405] *** Warning: <AVPlayerViewController: 0x7fde72874600> is trying to enter full screen, but is not in its view's window's view controller hierarchy. This results in undefined behavior.
        ASSERTION FAILED: !m_audioProducers.hasNullReferences()
Comment 7 WebKit Commit Bot 2019-04-30 13:19:04 PDT
Re-opened since this is blocked by bug 197436
Comment 8 youenn fablet 2019-04-30 15:20:23 PDT
Created attachment 368618 [details]
Relanding
Comment 9 youenn fablet 2019-04-30 16:45:55 PDT
I am not able to repro locally the debug ASSERT.
I removed it from the landing patch though.
Comment 10 youenn fablet 2019-04-30 17:00:20 PDT
> Also an API failure on iOS Simulator Debug
> 
> TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS
>         2019-04-30 10:52:49.866 TestWebKitAPI[48813:5640405] *** Warning:
> <AVPlayerViewController: 0x7fde72084800> is trying to enter full screen, but
> is not in its view's window's view controller hierarchy. This results in
> undefined behavior.
>         2019-04-30 10:52:50.763 TestWebKitAPI[48813:5640405] *** Warning:
> <AVPlayerViewController: 0x7fde71042c00> is trying to enter full screen, but
> is not in its view's window's view controller hierarchy. This results in
> undefined behavior.
>         >>>> frameSizeChanged = 4096
>         >>>> frameSizeChanged = 4096
>         2019-04-30 10:52:51.207 TestWebKitAPI[48813:5640405] *** Warning:
> <AVPlayerViewController: 0x7fde718b9c00> is trying to enter full screen, but
> is not in its view's window's view controller hierarchy. This results in
> undefined behavior.
>         2019-04-30 10:52:51.682 TestWebKitAPI[48813:5640405] *** Warning:
> <AVPlayerViewController: 0x7fde72874600> is trying to enter full screen, but
> is not in its view's window's view controller hierarchy. This results in
> undefined behavior.
>         ASSERTION FAILED: !m_audioProducers.hasNullReferences()

Given this crash, I would think HTMLMediaElement to be triggering this ASSERT since there is neither media stream track nor web audio.
Comment 11 WebKit Commit Bot 2019-04-30 17:13:19 PDT
Comment on attachment 368618 [details]
Relanding

Clearing flags on attachment: 368618

Committed r244815: <https://trac.webkit.org/changeset/244815>
Comment 12 WebKit Commit Bot 2019-04-30 17:13:20 PDT
All reviewed patches have been landed.  Closing bug.