Incompatibility Qt6 Gstreamer 1.22.6
Hi,
We used gstreamer 1.19.2 for our application but due to a bug we had to upgrade it. I tried the 1.22.6 release then and I got these messages :
GLib-GObject-CRITICAL **: 16:25:01.689: cannot register existing type 'GWin32RegistryKey'
GLib-GObject-CRITICAL **: 16:25:01.689: cannot add private field to invalid (non-instantiatable) type ''
GLib-GObject-CRITICAL **: 16:25:01.689: cannot register existing type 'GInitable'
GLib-GObject-CRITICAL **: 16:25:01.689: g_type_interface_add_prerequisite: assertion 'G_TYPE_IS_INTERFACE (interface_type)' failed
GLib-CRITICAL **: 16:25:01.689: g_once_init_leave: assertion 'result != 0' failed
GLib-GObject-CRITICAL **: 16:25:01.689: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed
GLib-CRITICAL **: 16:25:01.689: g_once_init_leave: assertion 'result != 0' failed
gst_init_check does not return when it happens. I tried Qt 6.2.4 6.2.8 and 6.5.0 with msvc and I have the exact same behavior.
My application sets the GST_PLUGIN_PATH at the begining, if this folder doesn't exist gst_init_check returns.
Therefore, in order to reproduce the problem you have to set GST_PLUGIN_PATH to your gstreamer install, use gstreamer 1.22.6 and any of the 3 versions of Qt mentionned earlier (maybe with the use of QApplication).
Expected Behavior
gst_init_check returns if the gstreamer path pointed by GST_PLUGIN_PATH exists
Observed Behavior
gst_init_check doesn't return and I have the following output in debug
GLib-GObject-CRITICAL **: 16:25:01.689: cannot register existing type 'GWin32RegistryKey'
GLib-GObject-CRITICAL **: 16:25:01.689: cannot add private field to invalid (non-instantiatable) type ''
GLib-GObject-CRITICAL **: 16:25:01.689: cannot register existing type 'GInitable'
GLib-GObject-CRITICAL **: 16:25:01.689: g_type_interface_add_prerequisite: assertion 'G_TYPE_IS_INTERFACE (interface_type)' failed
GLib-CRITICAL **: 16:25:01.689: g_once_init_leave: assertion 'result != 0' failed
GLib-GObject-CRITICAL **: 16:25:01.689: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed
GLib-CRITICAL **: 16:25:01.689: g_once_init_leave: assertion 'result != 0' failed
Setup
- **Operating System:Windows 10 Pro 19044.1826
- Device: Computer Dual boot Ubuntu 22.04
- **GStreamer Version:1.22.6
- Command line: cmake then run exe
Steps to reproduce the bug
- Create a C++ project with Qt6.2.8 for example and gstreamer 1.22.6
- In the main function set the GST_PLUGIN_PATH with _putenv_s, then use QApplication, then gst_init_check
- Build in debug and run
How reproducible is the bug?
Always with this configuration
Screenshots if relevant
Solutions you have tried
Retrograde version to 1.20.0