Bug 219653
Summary: | [GStreamer] proxy.getAvailableBuffer() can only be called from the compositor thread | ||
---|---|---|---|
Product: | WebKit | Reporter: | Alicia Boya García <aboya> |
Component: | WebKitGTK | Assignee: | Philippe Normand <philn> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | bugs-noreply, philn |
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Alicia Boya García
void MediaPlayerPrivateGStreamer::pushTextureToCompositor()
{
[...]
auto internalCompositingOperation = [this](TextureMapperPlatformLayerProxy& proxy, std::unique_ptr<GstVideoFrameHolder>&& frameHolder) {
[...]
if (frameHolder->hasMappedTextures()) {
[...]
} else {
layerBuffer = proxy.getAvailableBuffer(frameHolder->size(), GL_DONT_CARE);
This code runs inside the streaming thread of the video sink (see the stack trace below). The `else` case is not intended to hit in a default desktop build of WebKit, but if it does, it will because TextureMapperPlatformLayerProxy::getAvailableBuffer() expects to be run from the compositor thread.
ASSERTION FAILED: m_compositorThread == &Thread::current()
#0 WTFCrash() () at ../../Source/WTF/wtf/Assertions.cpp:295
#1 0x00007f59cd0479b7 in CRASH_WITH_INFO(...) () at DerivedSources/ForwardingHeaders/wtf/Assertions.h:713
#2 0x00007f59ce74b47c in WebCore::TextureMapperPlatformLayerProxy::getAvailableBuffer(WebCore::IntSize const&, int) (this=0x7f595c5a2820, size=..., internalFormat=4352) at ../../Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:140
#3 0x00007f59d1b5fd63 in operator()(WebCore::TextureMapperPlatformLayerProxy&, std::unique_ptr<WebCore::GstVideoFrameHolder, std::default_delete<WebCore::GstVideoFrameHolder> >&&) const (__closure=0x7f58897f80a8, proxy=..., frameHolder=...) at ../../Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:2912
#4 0x00007f59d1b60015 in operator()(WebCore::TextureMapperPlatformLayerProxy&) const (__closure=0x7f58897f80a0, proxy=...) at ../../Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:2952
#5 0x00007f59d1b6012e in WebCore::MediaPlayerPrivateGStreamer::pushTextureToCompositor() (this=0x7f592439b000) at ../../Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:2957
#6 0x00007f59d1b6102e in WebCore::MediaPlayerPrivateGStreamer::triggerRepaint(_GstSample*) (this=0x7f592439b000, sample=0x562457872120 [GstSample]) at ../../Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:3117
#7 0x00007f59d1b45030 in operator()(GstElement*, WebCore::MediaPlayerPrivateGStreamer*) const (__closure=0x0, sink=0x5624575a2c00 [GstAppSink|webkit-gl-video-appsink], player=0x7f592439b000) at ../../Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:235
#8 0x00007f59d1b45082 in _FUN(GstElement*, WebCore::MediaPlayerPrivateGStreamer*) () at ../../Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:235
#9 0x00007f59b5a95f75 in ffi_call_unix64 () at ../src/x86/unix64.S:101
#10 0x00007f59b5a95369 in ffi_call_int (cif=<optimized out>, fn=<optimized out>, rvalue=<optimized out>, avalue=<optimized out>, closure=<optimized out>) at ../src/x86/ffi64.c:669
#11 0x00007f59b75658da in g_cclosure_marshal_generic_va (closure=<optimized out>, return_value=<optimized out>, instance=<optimized out>, args_list=<optimized out>, marshal_data=<optimized out>, n_params=<optimized out>, param_types=<optimized out>) at ../gobject/gclosure.c:1614
#12 0x00007f59b7564b46 in _g_closure_invoke_va (closure=closure@entry=0x562457326370, return_value=return_value@entry=0x7f58897f8580, instance=instance@entry=0x5624575a2c00, args=args@entry=0x7f58897f8630, n_params=0, param_types=0x0) at ../gobject/gclosure.c:873
#13 0x00007f59b757db5f in g_signal_emit_valist (instance=0x5624575a2c00, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7f58897f8630) at ../gobject/gsignal.c:3403
#14 0x00007f59b757dd43 in g_signal_emit (instance=instance@entry=0x5624575a2c00, signal_id=<optimized out>, detail=detail@entry=0) at ../gobject/gsignal.c:3550
#15 0x00007f59b7f40c9c in gst_app_sink_preroll (psink=0x5624575a2c00 [GstAppSink|webkit-gl-video-appsink], buffer=<optimized out>) at ../gst-libs/gst/app/gstappsink.c:840
#16 0x00007f59b7eed653 in gst_base_sink_do_preroll (sink=sink@entry=0x5624575a2c00 [GstAppSink|webkit-gl-video-appsink], obj=obj@entry=0x7f594c0155a0 [GstBuffer]) at ../libs/gst/base/gstbasesink.c:2503
#17 0x00007f59b7eee10c in gst_base_sink_do_sync (basesink=basesink@entry=0x5624575a2c00 [GstAppSink|webkit-gl-video-appsink], obj=obj@entry=0x7f594c0155a0 [GstBuffer], late=late@entry=0x7f58897f8960, step_end=step_end@entry=0x7f58897f8964) at ../libs/gst/base/gstbasesink.c:2728
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Philippe Normand
How do we reproduce this issue? Running some specific layout test?
Philippe Normand
Pull request: https://github.com/WebKit/WebKit/pull/20899
Philippe Normand
Just saw it on media/video-create-with-user-gesture.html and media/track/track-cues-cuechange.html on the GTK Debug bots.
EWS
Committed 271135@main (3d00b4621046): <https://commits.webkit.org/271135@main>
Reviewed commits have been landed. Closing PR #20899 and removing active labels.