Bug 209827

Summary: CRASH in MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer(), uncaught ObjC exception
Product: WebKit Reporter: Jer Noble <jer.noble>
Component: New BugsAssignee: Jer Noble <jer.noble>
Status: RESOLVED FIXED    
Severity: Normal CC: calvaris, darin, eric.carlson, ews-watchlist, glenn, mkwst, peng.liu6, philipj, sergio, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing
none
Patch for landing none

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].