gtk4paintablesink: critical warnings when calling GST_DEBUG_BIN_TO_DOT_FILE
Describe your issue
I'm writing a C application that uses the gtk4paintablesink element. I've noticed the appearance of 2 different errors that appear on the console when GST_DEBUG_BIN_TO_DOT_FILE is called:
0:00:02.065090783 85863 0x7fffe4001080 ERROR gtk4paintablesink video/gtk4/src/sink/imp.rs:162:<gstgtk4::sink::imp::PaintableSink as glib::subclass::object::ObjectImpl>::property:<sink> Can't retrieve Paintable from non-main thread
(new_main_screen:85863): GLib-GObject-CRITICAL **: 12:49:58.896: g_param_value_defaults: assertion 'PSPEC_APPLIES_TO_VALUE (pspec, value)' failed
The function that's calling GST_DEBUG_BIN_TO_DOT_FILE isn't from the main thread so that partly explains the errors.
Expected Behavior
At least the second error should not be displayed.
Observed Behavior
While the operation of my application hasn't been affected at all and the dotfile with the pipeline indeed has the gtk4paintablesink in it, the errors are being displayed.
Setup
- Operating System: Ubuntu 24.04 LTS
- Device: Computer
- gst-plugins-rs Version: recently fetched, up to date with the GStreamer commit below
- GStreamer Version: recently fetched, commit b923a3e
- Command line: bash
Steps to reproduce the bug
- write a C app that generates a pipeline containing gtk4paintablesink
- create another thread and call GST_DEBUG_BIN_TO_DOT_FILE within it.
- compile and run the application with GST_DEBUG_DUMP_DOT_DIR=. macro exported.
How reproducible is the bug?
It always happens
Additional Information
Here's the backtrace that gdb gives me, it was larger but I just copied until the function that I wrote that calls GST_DEBUG_BIN_TO_DOT_FILE:
#0 g_logv (log_domain=0x7ffff7e6e015 "GLib-GObject", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7fffac9fef50)
at ../../../glib/gmessages.c:1277
#1 0x00007ffff6de3953 in g_log
(log_domain=log_domain@entry=0x7ffff7e6e015 "GLib-GObject", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7ffff6e40fc6 "%s: assertion '%s' failed") at ../../../glib/gmessages.c:1315
#2 0x00007ffff6de4b8d in g_return_if_fail_warning
(log_domain=log_domain@entry=0x7ffff7e6e015 "GLib-GObject", pretty_function=pretty_function@entry=0x7ffff7e78b30 <__func__.15.lto_priv.4> "g_param_value_defaults", expression=expression@entry=0x7ffff7e73c00 "PSPEC_APPLIES_TO_VALUE (pspec, value)") at ../../../glib/gmessages.c:3000
#3 0x00007ffff7e4dfcc in g_param_value_defaults (pspec=pspec@entry=0x555555aed8d0 [GParamObject], value=value@entry=0x7fffac9ff0d0)
at ../../../gobject/gparam.c:665
#4 0x00007ffff6f31302 in debug_dump_get_object_params
(object=object@entry=0x555555ba3200 [GstGtk4PaintableSink], details=details@entry=GST_DEBUG_GRAPH_SHOW_ALL, ignored_propnames=ignored_propnames@entry=0x7ffff702b280 <ignore_propnames>) at ../subprojects/gstreamer/gst/gstdebugutils.c:147
#5 0x00007ffff6f32a83 in debug_dump_element
(bin=bin@entry=0x555555c9d4e0 [GstGLSinkBin], details=details@entry=GST_DEBUG_GRAPH_SHOW_ALL, str=str@entry=0x7fff78048470, indent=indent@entry=2)
at ../subprojects/gstreamer/gst/gstdebugutils.c:644
#6 0x00007ffff6f32c7a in debug_dump_element
(bin=bin@entry=0x555555a61f90 [GstPipeline], details=details@entry=GST_DEBUG_GRAPH_SHOW_ALL, str=str@entry=0x7fff78048470, indent=indent@entry=1)
at ../subprojects/gstreamer/gst/gstdebugutils.c:696
#7 0x00007ffff6f32f04 in gst_debug_bin_to_dot_data (bin=bin@entry=0x555555a61f90 [GstPipeline], details=details@entry=GST_DEBUG_GRAPH_SHOW_ALL)
at ../subprojects/gstreamer/gst/gstdebugutils.c:831
#8 0x00007ffff6f330cc in gst_debug_bin_to_dot_file (bin=0x555555a61f90 [GstPipeline], details=GST_DEBUG_GRAPH_SHOW_ALL, file_name=<optimized out>)
at ../subprojects/gstreamer/gst/gstdebugutils.c:875
#9 0x0000555555559e7e in demux_pad_added_cb (demux=0x555555b22450 [GstTSDemux], new_pad=0x7fff7801c950 [GstPad], user_data=0x0)
at /home/iim/Workspace/new_main_screen/src/main.c:145