Bug 226081

Summary: [GStreamer] WebProcess crashes when certain elements are missing
Product: WebKit Reporter: Adrian Perez <aperez>
Component: WebKit Misc.Assignee: Philippe Normand <pnormand>
Status: RESOLVED FIXED    
Severity: Normal CC: calvaris, cgarcia, eric.carlson, ews-watchlist, glenn, gustavo, hta, jer.noble, lmoura, mcatanzaro, menard, philipj, pnormand, sergio, tommyw, vjaquez, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://github.com/Igalia/wpewebkit.org/pull/83
https://bugs.webkit.org/show_bug.cgi?id=190469
Attachments:
Description Flags
Patch
none
Patch for landing none

Description Adrian Perez 2021-05-21 06:55:50 PDT
Some GStreamer elements like “autoaudiosink” are expected to be available, and
the media playback code does not check whether their instantiation succeeded
before using pointers that can be null if those elements are not available for
some reason.

For example: Source/WebCore/platform/graphics/gstreamer/GStreamerAudioMixer.cpp:51
instantiates “autoaudiosink”, then adds it to a pipeline without doing any checks.
Comment 1 Adrian Perez 2021-05-21 06:59:11 PDT
We have had other similar situations in the past like bug #190469
(and probably more, I have not done an extensive search in Bugzilla).
Comment 2 Philippe Normand 2021-05-21 08:00:22 PDT
Created attachment 429288 [details]
Patch
Comment 3 Adrian Perez 2021-05-24 04:21:46 PDT
(In reply to Philippe Normand from comment #2)
> Created attachment 429288 [details]
> Patch

Neat \o/
Comment 4 EWS 2021-05-24 04:22:40 PDT
Committed r277947 (238074@main): <https://commits.webkit.org/238074@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 429288 [details].
Comment 5 Radar WebKit Bug Importer 2021-05-24 04:23:17 PDT
<rdar://problem/78394687>
Comment 6 Michael Catanzaro 2021-05-24 06:24:53 PDT
Reopening to attach new patch.
Comment 7 Michael Catanzaro 2021-05-24 06:24:56 PDT
Created attachment 429528 [details]
Patch for landing
Comment 8 Lauro Moura 2021-05-24 06:48:43 PDT
Committed r277948 (238075@main): <https://commits.webkit.org/238075@main>