Segfault playing video with gst-launch-1.0 playbin; crashes libreoffice impress
I am facing a segfault of gstreamer on any video. This occurs with libreoffice impress whenever I try to insert a video into a slide, which I reported at https://bugs.documentfoundation.org/show_bug.cgi?id=156445, and you can find my system information there (up-to-date Ubuntu Linux).
I am able to reproduce with the following command:
$ gst-launch-1.0 playbin uri=file:////tmp/myvideo.mp4 Setting pipeline to PAUSED ... Pipeline is PREROLLING ...
(gst-launch-1.0:2132306): GStreamer-CRITICAL **: 15:27:08.872: gst_caps_from_string: assertion 'string' failed
(gst-launch-1.0:2132306): GStreamer-CRITICAL **: 15:27:08.872: gst_pad_template_new: assertion 'caps != NULL' failed
(gst-launch-1.0:2132306): GStreamer-CRITICAL **: 15:27:08.872: gst_mini_object_unref: assertion 'mini_object != NULL' failed
(gst-launch-1.0:2132306): GStreamer-CRITICAL **: 15:27:08.872: gst_element_class_add_pad_template: assertion 'GST_IS_PAD_TEMPLATE (templ)' failed
(gst-launch-1.0:2132306): GStreamer-Video-CRITICAL **: 15:27:08.872: gst_video_decoder_init: assertion 'pad_template != NULL' failed
(gst-launch-1.0:2132306): GStreamer-WARNING **: 15:27:08.872: Element vaapidecode0 has an ALWAYS template src, but no pad of the same name Caught SIGSEGV #0 0x00007fc533d42d7f in __GI___poll (fds=0x557662bc7dd0, nfds=2, timeout=100) #1 0x00007fc533f5d1f6 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #2 0x00007fc533f072b3 in g_main_loop_run () #3 (closed) 0x00005576612acadb in () #4 (closed) 0x00007fc533c53d90 in __libc_start_call_main #5 0x00007fc533c53e40 in __libc_start_main_impl #6 0x00005576612acc05 in _start () Spinning. Please run 'gdb gst-launch-1.0 2132306' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.
$ gdb gst-launch-1.0 2132306 ... Reading symbols from gst-launch-1.0... (No debugging symbols found in gst-launch-1.0) Attaching to program: /usr/bin/gst-launch-1.0, process 2132306 [New LWP 2132307] [New LWP 2132308] [New LWP 2132309] [New LWP 2132310] [New LWP 2132311] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". 0x00007fc533d42d7f in __GI___poll (fds=0x557662bc7dd0, nfds=2, timeout=100) at ../sysdeps/unix/sysv/linux/poll.c:29 29 ../sysdeps/unix/sysv/linux/poll.c: No such file or directory. (gdb) info thread Id Target Id Frame
- 1 Thread 0x7fc533971740 (LWP 2132306) "gst-launch-1.0" 0x00007fc533d42d7f in __GI___poll (fds=0x557662bc7dd0, nfds=2, timeout=100) at ../sysdeps/unix/sysv/linux/poll.c:29 2 Thread 0x7fc5320e9640 (LWP 2132307) "typefind:sink" syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38 3 Thread 0x7fc5318e8640 (LWP 2132308) "gmain" 0x00007fc533d42d7f in __GI___poll (fds=0x557662bc7b40, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29 4 Thread 0x7fc530cd8640 (LWP 2132309) "qtdemux0:sink" 0x00007fc533d0f868 in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=0x7fc530cd5c00, rem=0x7fc530cd5bf0) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:78 5 Thread 0x7fc523fff640 (LWP 2132310) "multiqueue0:src" syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38 6 Thread 0x7fc5237fe640 (LWP 2132311) "qtdemux0:sink" 0x00007fc533d0f868 in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=0x7fc5237fdcd0, rem=0x7fc5237fdcc0) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:78 (gdb)
I found this ancient thread from 2013: https://bbs.archlinux.org/viewtopic.php?id=165774 Based on that I have:
$ apt search gst-plugins Sorting... Done Full Text Search... Done gir1.2-gst-plugins-bad-1.0/jammy-updates,now 1.20.3-0ubuntu1 amd64 [installed,automatic] GObject introspection data for the GStreamer libraries from the "bad" set
gir1.2-gst-plugins-base-1.0/jammy,now 1.20.1-1 amd64 [installed,automatic] GObject introspection data for the GStreamer Plugins Base library
$ apt search gst-vaapi Sorting... Done Full Text Search... Done
Here is the gstreamer version I have installed:
$ apt search gstreamer|grep gstreamer|grep installed
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
gir1.2-gstreamer-1.0/jammy-updates,now 1.20.3-0ubuntu1 amd64 [installed,automatic] gstreamer1.0-alsa/jammy,now 1.20.1-1 amd64 [installed,automatic] gstreamer1.0-clutter-3.0/jammy-updates,now 3.0.27-2ubuntu1 amd64 [installed,automatic] gstreamer1.0-gl/jammy,now 1.20.1-1 amd64 [installed,automatic] gstreamer1.0-gtk3/jammy-updates,now 1.20.3-0ubuntu1 amd64 [installed,automatic] gstreamer1.0-libav/jammy-updates,now 1.20.3-0ubuntu1 amd64 [installed,automatic] gstreamer1.0-nice/jammy,now 0.1.18-2 amd64 [installed,automatic] gstreamer1.0-packagekit/jammy,now 1.2.5-2ubuntu2 amd64 [installed,automatic] gstreamer1.0-pipewire/jammy-updates,now 0.3.48-1ubuntu3 amd64 [installed,automatic] gstreamer1.0-plugins-bad/jammy-updates,now 1.20.3-0ubuntu1 amd64 [installed,automatic] gstreamer1.0-plugins-base/jammy,now 1.20.1-1 amd64 [installed] gstreamer1.0-plugins-good/jammy-updates,now 1.20.3-0ubuntu1 amd64 [installed] gstreamer1.0-plugins-ugly/jammy,now 1.20.1-1 amd64 [installed,automatic] gstreamer1.0-pulseaudio/jammy-updates,now 1.20.3-0ubuntu1 amd64 [installed] gstreamer1.0-tools/jammy-updates,now 1.20.3-0ubuntu1 amd64 [installed] gstreamer1.0-vaapi/jammy-updates,now 1.20.1-1ubuntu1 amd64 [installed,automatic] gstreamer1.0-x/jammy,now 1.20.1-1 amd64 [installed] libgstreamer-gl1.0-0/jammy,now 1.20.1-1 amd64 [installed,automatic] libgstreamer-plugins-bad1.0-0/jammy-updates,now 1.20.3-0ubuntu1 amd64 [installed,automatic] libgstreamer-plugins-base1.0-0/jammy,now 1.20.1-1 amd64 [installed] libgstreamer-plugins-good1.0-0/jammy-updates,now 1.20.3-0ubuntu1 amd64 [installed] libgstreamer1.0-0/jammy-updates,now 1.20.3-0ubuntu1 amd64 [installed] libreoffice-avmedia-backend-gstreamer/jammy-updates,jammy-security,now 1:7.3.7-0ubuntu0.22.04.3 amd64 [installed] phonon-backend-gstreamer-common/jammy,now 4:4.10.0-1build1 amd64 [installed] phonon4qt5-backend-gstreamer/jammy,now 4:4.10.0-1build1 amd64 [installed]