Bug 209827 - CRASH in MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer(), uncaught ObjC exception
Summary: CRASH in MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer(), uncaught O...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-03-31 12:41 PDT by Jer Noble
Modified: 2020-04-01 14:15 PDT (History)
10 users (show)

See Also:


Attachments
Patch (5.82 KB, patch)
2020-03-31 12:46 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch for landing (10.60 KB, patch)
2020-03-31 18:03 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch for landing (10.56 KB, patch)
2020-04-01 11:57 PDT, Jer Noble
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2020-03-31 12:41:39 PDT
CRASH in MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer(), uncaught ObjC exception
Comment 1 Jer Noble 2020-03-31 12:42:07 PDT
<rdar://problem/61113080>
Comment 2 Radar WebKit Bug Importer 2020-03-31 12:42:20 PDT
<rdar://problem/61120016>
Comment 3 Jer Noble 2020-03-31 12:46:55 PDT
Created attachment 395081 [details]
Patch
Comment 4 Darin Adler 2020-03-31 12:51:50 PDT
Comment on attachment 395081 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=395081&action=review

> Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:903
> +                ASSERT_NOT_REACHED();

I don’t really like using assertions like this. As a project we intend to use assertions for things that must *never* happen, not for things that *normally* don’t happen.

The other cases in this patch seem to be truly "should never happen" cases, although I might be wrong about that.
Comment 5 Jer Noble 2020-03-31 12:57:45 PDT
Comment on attachment 395081 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=395081&action=review

>> Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:903
>> +                ASSERT_NOT_REACHED();
> 
> I don’t really like using assertions like this. As a project we intend to use assertions for things that must *never* happen, not for things that *normally* don’t happen.
> 
> The other cases in this patch seem to be truly "should never happen" cases, although I might be wrong about that.

My goal here is to catch this case in layout tests; this scenario could easily cause layout test flakiness in a totally un-diagnosable way. If we upgrade a bot to a new OS and this ASSERTion starts getting hit and generates crashlogs, we can immediately trace the cause to a particular OS revision.

But maybe we can achieve this some other way, like through a WKTR or DRT only console log that would show up in the test .diff?
Comment 6 Darin Adler 2020-03-31 13:15:51 PDT
(In reply to Jer Noble from comment #5)
> My goal here is to catch this case in layout tests

Got it!

> But maybe we can achieve this some other way, like through a WKTR or DRT only console log that would show up in the test .diff?

Yes, I think there is quite a bit of logging that shows up in regression test results. Let's check on that.
Comment 7 Jer Noble 2020-03-31 18:03:29 PDT
Created attachment 395117 [details]
Patch for landing
Comment 8 Jer Noble 2020-04-01 11:57:25 PDT
Created attachment 395191 [details]
Patch for landing
Comment 9 EWS 2020-04-01 14:15:23 PDT
Committed r259363: <https://trac.webkit.org/changeset/259363>

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