Segmentation fault running `gst-inspect -a` when libgstgtk4.so is installed
Describe your issue
Segmentation fault when getting default value of paintable
property from gtk4paintablesink
element:
cannot register existing type 'GdkDisplayManager'
Expected Behavior
No Segmentation fault
Observed Behavior
Segmentation fault
Setup
- Operating System: Arch
- gst-plugins-rs Version: main
- GStreamer Version: 1.22.9
-
Command line:
gst-inspect-1.0 -a
Steps to reproduce the bug
Easily reproducible with:
mkdir lib
cp /usr/lib/gstreamer-1.0/libgstgtk4.so lib
cp /usr/lib/gstreamer-1.0/libgstgtk.so lib
G_DEBUG=fatal-warnings GST_PLUGIN_SYSTEM_PATH=$(realpath lib ) GST_INSPECT_NO_COLORS=true PAGER=cat gst-inspect-1.0 -a
How reproducible is the bug?
Always
libgstgtk4.so
uses libgtk-4.so.1
and libgstgtk.so
uses libgtk-3.so.0
Additional Information
gdb backtrace
Thread 1 "gst-inspect-1.0" received signal SIGTRAP, Trace/breakpoint trap.
g_logv (log_domain=0x7ffff7cd4015 "GLib-GObject", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7fffffffd0a0) at ../glib/glib/gmessages.c:1423
1423 g_private_set (&g_log_depth, GUINT_TO_POINTER (depth));
(gdb) bt
#0 g_logv (log_domain=0x7ffff7cd4015 "GLib-GObject", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7fffffffd0a0) at ../glib/glib/gmessages.c:1423
#1 0x00007ffff7d54724 in g_log (log_domain=log_domain@entry=0x7ffff7cd4015 "GLib-GObject", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7ffff7cdbea8 "cannot register existing type '%s'") at ../glib/glib/gmessages.c:1461
#2 0x00007ffff7cc604e in check_type_name_I (type_name=0x7ffff6f250e8 "GdkDisplayManager") at ../glib/gobject/gtype.c:791
#3 0x00007ffff7ccd52f in g_type_register_static (parent_type=parent_type@entry=0x50, type_name=0x7ffff6f250e8 "GdkDisplayManager", info=info@entry=0x7fffffffd1f0, flags=flags@entry=G_TYPE_FLAG_NONE) at ../glib/gobject/gtype.c:2881
#4 0x00007ffff7ccd789 in g_type_register_static_simple
(flags=G_TYPE_FLAG_NONE, instance_init=0x7fffea62dae0 <gdk_display_manager_init>, instance_size=40, class_init=0x7fffea635270 <gdk_display_manager_class_intern_init>, class_size=144, type_name=<optimized out>, parent_type=0x50) at ../glib/gobject/gtype.c:2849
#5 g_type_register_static_simple
(parent_type=parent_type@entry=0x50, type_name=<optimized out>, class_size=class_size@entry=144, class_init=class_init@entry=0x7fffea635270 <gdk_display_manager_class_intern_init>, instance_size=instance_size@entry=40, instance_init=instance_init@entry=0x7fffea62dae0 <gdk_display_manager_init>, flags=G_TYPE_FLAG_NONE) at ../glib/gobject/gtype.c:2822
#6 0x00007fffea62e10e in gdk_display_manager_get_type_once () at ../gtk/gdk/gdkdisplaymanager.c:123
#7 0x00007fffea62f695 in gdk_display_manager_get_type () at ../gtk/gdk/gdkdisplaymanager.c:123
#8 0x00007fffea62f6f2 in gdk_display_manager_get () at ../gtk/gdk/gdkdisplaymanager.c:298
#9 0x00007fffea62f7ce in gdk_display_get_default () at ../gtk/gdk/gdkdisplaymanager.c:332
#10 0x00007ffff2aeb00a in ??? () at /home/tmp/GdkDisplayManager/ws/lib/libgstgtk4.so
#11 0x00007ffff7d4c9e5 in g_main_context_invoke_full (context=0x5555555934e0, priority=200, function=0x7ffff2aeae50, data=0x55555573c360, notify=0x7ffff2aed4f0) at ../glib/glib/gmain.c:6549
#12 0x00007ffff2ad413d in ??? () at /home/tmp/GdkDisplayManager/ws/lib/libgstgtk4.so
#13 0x00007ffff2aed96f in ??? () at /home/tmp/GdkDisplayManager/ws/lib/libgstgtk4.so
#14 0x00007ffff7cb5ecc in object_get_property (value=0x7fffffffdd00, pspec=0x55555574b810, object=0x555555750fc0) at ../glib/gobject/gobject.c:1779
#15 g_object_get_property (object=0x555555750fc0, property_name=<optimized out>, value=0x7fffffffdd00) at ../glib/gobject/gobject.c:3093
#16 0x0000555555559786 in print_object_properties_info (obj=obj@entry=0x555555750fc0, obj_class=0x5555556d3700, desc=desc@entry=0x55555555f6e1 "Element Properties") at ../gstreamer/subprojects/gstreamer/tools/gst-inspect.c:461
#17 0x000055555555bbcb in print_element_properties_info (element=0x555555750fc0 [GstElement|gtk4paintablesink0]) at ../gstreamer/subprojects/gstreamer/tools/gst-inspect.c:799
#18 print_element_info (feature=feature@entry=0x555555592390 [GstPluginFeature|gtk4paintablesink], print_names=print_names@entry=1) at ../gstreamer/subprojects/gstreamer/tools/gst-inspect.c:1773
#19 0x000055555555de3c in print_element_list (ftypes=<optimized out>, print_all=1) at ../gstreamer/subprojects/gstreamer/tools/gst-inspect.c:1389
#20 real_main (argc=<optimized out>, argv=<optimized out>) at ../gstreamer/subprojects/gstreamer/tools/gst-inspect.c:2317
#21 0x00007ffff7ad3cd0 in __libc_start_call_main (main=main@entry=0x555555558020 <main>, argc=argc@entry=2, argv=argv@entry=0x7fffffffe2e8) at ../sysdeps/nptl/libc_start_call_main.h:58
#22 0x00007ffff7ad3d8a in __libc_start_main_impl (main=0x555555558020 <main>, argc=2, argv=0x7fffffffe2e8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe2d8) at ../csu/libc-start.c:360
#23 0x0000555555558055 in _start ()