Clementine segfaults at startup when media-libs/qt-gstreamer[qt5] is installed as it tries to load both qt4 and qt5 libraries. I had to disable qt5 to get it working, if I enable both it still tries to load the qt5 versions. Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7f315a976700 (LWP 1915)] 0x00007f3114f48097 in QMetaObject::className() const () from /usr/lib64/libQt5Core.so.5 (gdb) bt #0 0x00007f3114f48097 in QMetaObject::className() const () from /usr/lib64/libQt5Core.so.5 #1 0x00007f3115933e57 in ?? () from /usr/lib64/libQt5Widgets.so.5 #2 0x00007f31158bb867 in ?? () from /usr/lib64/libQt5Widgets.so.5 #3 0x00007f3173c123aa in ?? () from /lib64/ld-linux-x86-64.so.2 #4 0x00007f3173c124bb in ?? () from /lib64/ld-linux-x86-64.so.2 #5 0x00007f3173c16a88 in ?? () from /lib64/ld-linux-x86-64.so.2 #6 0x00007f3173c12254 in ?? () from /lib64/ld-linux-x86-64.so.2 #7 0x00007f3173c16109 in ?? () from /lib64/ld-linux-x86-64.so.2 #8 0x00007f316c47cfd9 in ?? () from /lib64/libdl.so.2 #9 0x00007f3173c12254 in ?? () from /lib64/ld-linux-x86-64.so.2 #10 0x00007f316c47d589 in ?? () from /lib64/libdl.so.2 #11 0x00007f316c47d071 in dlopen () from /lib64/libdl.so.2 #12 0x00007f316a961952 in g_module_open () from /usr/lib64/libgmodule-2.0.so.0 #13 0x00007f31705ac775 in _priv_gst_plugin_load_file_for_registry (filename=filename@entry=0x7f31541cc170 "/usr/lib64/gstreamer-1.0/libgstqt5videosink.so", registry=0x7f315405c160, error=error@entry=0x0) at /var/tmp/portage/media-libs/gstreamer-1.8.3/work/gstreamer-1.8.3/gst/gstplugin.c:745 #14 0x00007f31705b9d38 in gst_registry_scan_plugin_file (context=context@entry=0x7f315a975b40, filename=filename@entry=0x7f31541cc170 "/usr/lib64/gstreamer-1.0/libgstqt5videosink.so", file_size=156112, file_mtime=1486816871) at /var/tmp/portage/media-libs/gstreamer-1.8.3/work/gstreamer-1.8.3/gst/gstregistry.c:1180 #15 0x00007f31705baaeb in gst_registry_scan_path_level (context=context@entry=0x7f315a975b40, path=path@entry=0x7f317061b3ce "/usr/lib64/gstreamer-1.0", level=level@entry=10) at /var/tmp/portage/media-libs/gstreamer-1.8.3/work/gstreamer-1.8.3/gst/gstregistry.c:1338 #16 0x00007f31705bafc6 in gst_registry_scan_path_internal (context=context@entry=0x7f315a975b40, path=path@entry=0x7f317061b3ce "/usr/lib64/gstreamer-1.0") at /var/tmp/portage/media-libs/gstreamer-1.8.3/work/gstreamer-1.8.3/gst/gstregistry.c:1365 #17 0x00007f31705bcbb2 in scan_and_update_registry (write_changes=1, error=0x7f315a975b38, registry_file=0x7f315405ec10 "/home/fernan/.cache/gstreamer-1.0/registry.x86_64.bin", default_registry=0x7f315405c160) at /var/tmp/portage/media-libs/gstreamer-1.8.3/work/gstreamer-1.8.3/gst/gstregistry.c:1660 #18 ensure_current_registry (error=0x7f315a975b38) at /var/tmp/portage/media-libs/gstreamer-1.8.3/work/gstreamer-1.8.3/gst/gstregistry.c:1752 #19 gst_update_registry () at /var/tmp/portage/media-libs/gstreamer-1.8.3/work/gstreamer-1.8.3/gst/gstregistry.c:1828 #20 0x00007f3170550bf6 in init_post (context=<optimized out>, group=<optimized out>, data=<optimized out>, error=<optimized out>) at /var/tmp/portage/media-libs/gstreamer-1.8.3/work/gstreamer-1.8.3/gst/gst.c:720 #21 0x00007f3170b24b29 in g_option_context_parse () from /usr/lib64/libglib-2.0.so.0 #22 0x00007f3170551567 in gst_init_check (argc=0x0, argv=0x0, err=0x7f315a975cb8) at /var/tmp/portage/media-libs/gstreamer-1.8.3/work/gstreamer-1.8.3/gst/gst.c:354 #23 0x00007f31705515a7 in gst_init (argc=<optimized out>, argv=<optimized out>) at /var/tmp/portage/media-libs/gstreamer-1.8.3/work/gstreamer-1.8.3/gst/gst.c:400 #24 0x0000000000636e1a in GstEngine::InitialiseGstreamer() () #25 0x00000000005ca9cd in QtConcurrent::RunFunctionTask<void>::run() () #26 0x00007f3172b3516a in ?? () from /usr/lib64/qt4/libQtCore.so.4 #27 0x00007f3172b436cd in ?? () from /usr/lib64/qt4/libQtCore.so.4 #28 0x00007f31714c2454 in start_thread () from /lib64/libpthread.so.0 #29 0x00007f316ce5428d in clone () from /lib64/libc.so.6
I can't reproduce the segfault. Generally it doesn't sounds like a clementine's issue: the clementine doesn't depends upon media-libs/qt-gstreamer. Could you try to reproduce this with some other gstreamer software? e.g. media-video/totem?
Can you delete any gstreamer directories on your home directory and make sure that clementine actually closed before restarting it. AFAIU gstreamer keeps a registry of installed plugins but its updated when you restart the program. I'm not sure who's bug is it but it happens when clementine calls gst_init(nullptr, nullptr). According to gstreamer's documentation it is supposed to load all system-wide plugins so gstreamer is doing the right thing as per the docs. Clementine can pass a custom plugin registry via an environment variable to only load the plugins it needs. I haven't tried media-video/totem yet but I'm pretty sure I won't have exactly the same problem since it's not a Qt application. But I will try it later with both qt4 and qt5 enabled for qt-gstreamer and see what happens.
I finally managed to reproduce the failure by setting GST_REGISTRY_FORK=no. Do you somewhy have it in your environment? Have you some other wierd GST variables set? If you don't the failure likely indicates that gst registry helper fails to start. Could you post the output of "GST_DEBUG=5 GST_DEBUG_NO_COLOR=yes clementine 2>&1"? (In reply to Fernando Rodriguez from comment #2) > Can you delete any gstreamer directories on your home directory and make > sure that clementine actually closed before restarting it. AFAIU gstreamer > keeps a registry of installed plugins but its updated when you restart the > program. As you can already understood the removing of cache haven't brought any results as well as running under a crystal clean profile. > I'm not sure who's bug is it but it happens when clementine calls > gst_init(nullptr, nullptr). According to gstreamer's documentation it is > supposed to load all system-wide plugins so gstreamer is doing the right > thing as per the docs. Clementine can pass a custom plugin registry via an > environment variable to only load the plugins it needs. The call gst_init() loads only standerd plugins (i.e. that come with gstreamer itself), not all system-wide plugins. The failure happens during registering of installed plugins. Normally it should be done in a separate process (/usr/lib64/gstreamer-1.0/gst-plugin-scanner) and shouldn't interact with the main one, but it seems somewhy on your system it's disabled or fails. If it is so, I don't really see a way how to sanely support it (i.e. AFAIS there are no ways to prevent registration of certain gstreamer plugins).
Thanks, that was helpful. AppArmor was preventing execution of gst-plugin-scanner. That's the first thing I should've checked, sorry.
(In reply to Fernando Rodriguez from comment #4) > Thanks, that was helpful. AppArmor was preventing execution of > gst-plugin-scanner. That's the first thing I should've checked, sorry. Shouldn't it be workarounded in gstreamer or whatever somehow?
(In reply to Fat-Zer from comment #5) > (In reply to Fernando Rodriguez from comment #4) > > Thanks, that was helpful. AppArmor was preventing execution of > > gst-plugin-scanner. That's the first thing I should've checked, sorry. > > Shouldn't it be workarounded in gstreamer or whatever somehow? If an AppArmor profile breaks an application, the profile needs updating. If the application could work around it, it'd default the point of AppArmor. :-)