GeopJr / Tuba

Browse the Fediverse
https://tuba.geopjr.dev/
GNU General Public License v3.0
504 stars 55 forks source link

[Bug]: GtkVideo with GraphicsOffload crashes when playing certain videos #1006

Closed GeopJr closed 2 weeks ago

GeopJr commented 2 weeks ago

Describe the bug

This is a weird one.

https://mastodon.social/@anatudor/112432781314072465

Trying to play this certain video with offload on, it will segfault, unless it has been cached. Trying to play this with offload off, will either play it or show the stop icon with the playbin3 error listed below.

Steps To Reproduce

  1. Search https://mastodon.social/@anatudor/112432781314072465
  2. Click the attachment on the found post
  3. Crash

Logs and/or Screenshots

Offload off:

Error from element /GstPlayBin3:playbin3/GstURIDecodeBin3:uridecodebin3/GstURISourceBin:urisourcebin2/GstParseBin:parsebin4/GstQTDemux:qtdemux4: Could not demultiplex stream.
This file contains no playable streams.
../gst/isomp4/qtdemux.c(512): gst_qtdemux_post_no_playable_stream_error (): /GstPlayBin3:playbin3/GstURIDecodeBin3:uridecodebin3/GstURISourceBin:urisourcebin2/GstParseBin:parsebin4/GstQTDemux:qtdemux4:
no known streams found

Offload on:

**
Gsk:ERROR:../gsk/gskoffload.c:292:transform_rounded_rect: assertion failed: (gsk_transform_get_category (t) >= GSK_TRANSFORM_CATEGORY_2D_AFFINE)
Bail out! Gsk:ERROR:../gsk/gskoffload.c:292:transform_rounded_rect: assertion failed: (gsk_transform_get_category (t) >= GSK_TRANSFORM_CATEGORY_2D_AFFINE)
fish: Job 1, 'dev.geopjr.Tuba' terminated by signal SIGABRT (Abort)

Backtrace:

#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
#1  0x00007ffff64c6b6f in __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
#2  0x00007ffff64784e2 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007ffff64614ed in __GI_abort () at ./stdlib/abort.c:79
#4  0x00007ffff7e78065 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ffff7ee0fbe in g_assertion_message_expr () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007ffff6c884b5 in transform_rounded_rect (self=0x555559555000, out_rect=0x7fffffffc4e0, rect=0x55555915c128) at ../gsk/gskoffload.c:292
#7  visit_node (self=self@entry=0x555559555000, node=0x55555915c100) at ../gsk/gskoffload.c:578
#8  0x00007ffff6c879aa in visit_node (self=self@entry=0x555559555000, node=0x5555595e84f0) at ../gsk/gskoffload.c:619
#9  0x00007ffff6c87a0e in visit_node (self=self@entry=0x555559555000, node=0x555555ab12b0) at ../gsk/gskoffload.c:613
#10 0x00007ffff6c879aa in visit_node (self=self@entry=0x555559555000, node=0x555555ab1950) at ../gsk/gskoffload.c:619
#11 0x00007ffff6c87a0e in visit_node (self=self@entry=0x555559555000, node=0x555555ab0ff0) at ../gsk/gskoffload.c:613
#12 0x00007ffff6c879aa in visit_node (self=self@entry=0x555559555000, node=0x555555ab1170) at ../gsk/gskoffload.c:619
#13 0x00007ffff6c87718 in visit_node (self=self@entry=0x555559555000, node=0x555555c411c0) at ../gsk/gskoffload.c:605
#14 0x00007ffff6c879aa in visit_node (self=self@entry=0x555559555000, node=0x555555c3ad80) at ../gsk/gskoffload.c:619
#15 0x00007ffff6c87a0e in visit_node (self=self@entry=0x555559555000, node=0x555555c377d0) at ../gsk/gskoffload.c:613
#16 0x00007ffff6c879aa in visit_node (self=self@entry=0x555559555000, node=0x555555c3ae90) at ../gsk/gskoffload.c:619
#17 0x00007ffff6c879aa in visit_node (self=self@entry=0x555559555000, node=0x555555c3bf80) at ../gsk/gskoffload.c:619
#18 0x00007ffff6c879aa in visit_node (self=self@entry=0x555559555000, node=0x555555c2b940) at ../gsk/gskoffload.c:619
#19 0x00007ffff6c87718 in visit_node (self=self@entry=0x555559555000, node=0x555555c3a240) at ../gsk/gskoffload.c:605
#20 0x00007ffff6c879aa in visit_node (self=self@entry=0x555559555000, node=0x5555595d9250) at ../gsk/gskoffload.c:619
#21 0x00007ffff6c87a0e in visit_node (self=self@entry=0x555559555000, node=node@entry=0x5555595d3eb0) at ../gsk/gskoffload.c:613
#22 0x00007ffff6c8869d in gsk_offload_new (surface=0x555555fcc700, root=root@entry=0x5555595d3eb0, diff=diff@entry=0x555559962970) at ../gsk/gskoffload.c:718
#23 0x00007ffff6c910b8 in gsk_renderer_render (renderer=0x555555f17320, root=0x5555595d3eb0, region=0x7fff28002d60) at ../gsk/gskrenderer.c:493
#24 0x00007ffff6a8f114 in gtk_widget_render (widget=widget@entry=0x5555559b12d0, surface=0x555555fcc700, region=region@entry=0x7fff28002d60) at ../gtk/gtkwidget.c:11971
#25 0x00007ffff6a962a5 in surface_render (surface=<optimized out>, region=region@entry=0x7fff28002d60, widget=widget@entry=0x5555559b12d0) at ../gtk/gtkwindow.c:4756
#26 0x00007ffff6c018f4 in _gdk_marshal_BOOLEAN__BOXEDv
    (closure=0x555556af3590, return_value=0x7fffffffdb70, instance=<optimized out>, args=<optimized out>, marshal_data=<optimized out>, n_params=<optimized out>, param_types=0x555555b26910)
    at gdk/gdkmarshalers.c:130
#27 0x00007ffff7d40939 in  () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#28 0x00007ffff7d55693 in  () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#29 0x00007ffff7d5bf06 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#30 0x00007ffff7d5bfc3 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#31 0x00007ffff6c7c3f2 in gdk_surface_paint_on_clock (clock=<optimized out>, data=0x555555fcc700) at ../gdk/gdksurface.c:1370
#32 gdk_surface_paint_on_clock (clock=<optimized out>, data=0x555555fcc700) at ../gdk/gdksurface.c:1346
#33 0x00007ffff7d40939 in  () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#34 0x00007ffff7d5633f in  () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#35 0x00007ffff7d5bf06 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#36 0x00007ffff7d5bfc3 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#37 0x00007ffff6c63ccf in _gdk_frame_clock_emit_paint (frame_clock=<optimized out>) at ../gdk/gdkframeclock.c:736
#38 0x00007ffff6c64af8 in gdk_frame_clock_paint_idle (data=data@entry=0x555555fcc400) at ../gdk/gdkframeclockidle.c:641
#39 0x00007ffff6c64d44 in gdk_frame_clock_flush_idle (data=0x555555fcc400) at ../gdk/gdkframeclockidle.c:407
#40 0x00007ffff7eb5b9e in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#41 0x00007ffff7eb2dff in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#42 0x00007ffff7eb4e87 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#43 0x00007ffff7eb54a0 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#44 0x00007ffff7b8243d in g_application_run () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#45 0x00005555555a4a53 in tuba_application_main (args=0x7fffffffe5e8, args_length1=1) at ../src/Application.vala:222
#46 0x00005555555a4a85 in main (argc=1, argv=0x7fffffffe5e8) at ../src/Application.vala:163

Instance Backend

glitch-soc

Operating System

Debian sid

Package

Flatpak

Troubleshooting information

No response

Additional Context

No response

GeopJr commented 2 weeks ago

cc: @rmader if you have a second

FWIW, if it's relevant at all, Tuba uses the old gl, not ngl or vulkan

rmader commented 2 weeks ago

Hm, this might be a good question for @matthiasclasen - do you have any idea here?

Gsk:ERROR:../gsk/gskoffload.c:292:transform_rounded_rect: assertion failed: (gsk_transform_get_category (t) >= GSK_TRANSFORM_CATEGORY_2D_AFFINE)
Bail out! Gsk:ERROR:../gsk/gskoffload.c:292:transform_rounded_rect: assertion failed: (gsk_transform_get_category (t) >= GSK_TRANSFORM_CATEGORY_2D_AFFINE)
fish: Job 1, 'dev.geopjr.Tuba' terminated by signal SIGABRT (Abort)
GeopJr commented 2 weeks ago

Figured it out (?) When done is called, Tuba expects the media_stream to be non-null. When offload is on, that's not the case. It will now check if it's non-null.

Continuing the 'done' process afterwards however, logs:

(dev.geopjr.Tuba:168475): GStreamer-Player-CRITICAL **: 21:08:31.749: gst_player_set_mute: assertion 'GST_IS_PLAYER (self)' failed
...

but at least it's not fatal!

EDIT:

Actually figured it out. Apart from the media stream issue, trying to change the volume while it's not the visible stack child, caused the GST_IS_PLAYER assert fail

EDIT 2:

Still getting it, something to do with the stack :/