Summary: | [GStreamer] Crash in AudioTrackPrivate with playbin3 enabled | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Philippe Normand <pnormand> | ||||||||
Component: | Media | Assignee: | Philippe Normand <pnormand> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | calvaris, mcatanzaro, tsaunier, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Philippe Normand
2019-04-15 09:40:27 PDT
m_audioTracks looks empty? This is with a RelWithDebInfo build: (gdb) f 2 #2 0x00007f40b2ab9c86 in _ZN7WebCore27MediaPlayerPrivateGStreamer13handleMessageEP11_GstMessage (this=0x7f27492b9c00, message=0x5650ca7a86a0) at ../Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1451 1451 track->markAsActive(); (gdb) p track $1 = <optimized out> (gdb) p m_audioTracks warning: can't find linker symbol for virtual table for `WebCore::MediaPlayerPrivateGStreamer' value warning: found `_ZTVN7WebCore30MediaPlayerPrivateGStreamerMSEE' instead $2 = {m_impl = {static m_maxLoad = 2, static m_minLoad = 6, m_table = 0x0, m_tableSize = 0, m_tableSizeMask = 0, m_keyCount = 0, m_deletedCount = 0}} (gdb) p streamId $3 = "511baabfffee5fa8069fe40b80215508" Created attachment 367421 [details]
Patch
Comment on attachment 367421 [details]
Patch
lgtm, but if someone set USE_PLAYBIN3, it will still break... should we unset it on `gst_init`?
(In reply to Thibault Saunier from comment #3) > Comment on attachment 367421 [details] > Patch > > lgtm, but if someone set USE_PLAYBIN3, it will still break... should we > unset it on `gst_init`? What would break? I've added a test to ensure we process stream collections only when the new var is set. Comment on attachment 367421 [details]
Patch
I found more issues, unfortunately :( Will update the patch, sorry.
(In reply to Thibault Saunier from comment #3) > Comment on attachment 367421 [details] > Patch > > lgtm, but if someone set USE_PLAYBIN3, it will still break... should we > unset it on `gst_init`? Good idea :P Created attachment 367516 [details]
Patch
Comment on attachment 367516 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=367516&action=review From the GStreamer PoV, this is ok. I'll let Michael have the final word about the env variables. > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:2372 > + if ((!isMediaSource() && g_getenv("WEBKIT_GST_USE_PLAYBIN3")) || (url.protocolIs("mediastream"))) I think there are issues here with too many () . Comment on attachment 367516 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=367516&action=review > Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp:230 > + // USE_PLAYBIN3 is dangerous for us because its potential sneaky effect > + // is to register the playbin3 element under the playbin namespace. We > + // can't allow this, when we create playbin, we want playbin2, not > + // playbin3. > + unsetenv("USE_PLAYBIN3"); This will need a rethink. See https://bugs.webkit.org/show_bug.cgi?id=194370#c6 for why you can't do this. Created attachment 367536 [details]
Patch
This got lost. Comment on attachment 367536 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=367536&action=review > Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp:230 > + if (getenv("USE_PLAYBIN3")) I'd use g_getenv and we're good to go. Committed r244584: <https://trac.webkit.org/changeset/244584> |