Bug 226081 - [GStreamer] WebProcess crashes when certain elements are missing
Summary: [GStreamer] WebProcess crashes when certain elements are missing
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Philippe Normand
Keywords: InRadar
Depends on:
Reported: 2021-05-21 06:55 PDT by Adrian Perez
Modified: 2021-05-24 07:29 PDT (History)
17 users (show)

See Also:

Patch (36.38 KB, patch)
2021-05-21 08:00 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff
Patch for landing (1.28 KB, patch)
2021-05-24 06:24 PDT, Michael Catanzaro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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]
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
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>