Summary: | media-video/vlc-1.1.12 - gui doesn't work: [0x19ee640] qt4 interface error: Xlib not initialized for threads | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Emmanuel Andry <eandry> |
Component: | Current packages | Assignee: | Alexis Ballier <aballier> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | media-video |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Vlc strace |
Description
Emmanuel Andry
2011-12-06 20:31:49 UTC
This is gonna be annoying to debug... vlc has checks for Xlib's thread initialisation. XInitThread funtion shall be the first Xlib function called within vlc's process because vlc is multithreaded. Some libraries (like old versions of pulseaudio) which are not multithreaded call Xlib's functions without calling XInitThread. In its pulseaudio support, vlc calls XInitThread before going in pulseaudio stuff for example. Now, the error you're seeing is exactly this, but for a yet undetermined library. Could you try to trace the function/library calls of your failing vlc process please? Setting a breakpoint on some common Xlib function within gdb can help too. CCing x11@, maybe they can help. Created attachment 295129 [details]
Vlc strace
Here's vlc strace. Hope this helps
well, at least i cannot interpret the output of this trace :) maybe better: $ gdb vlc (gdb) b XOpenDisplay (gdb) run Breakpoint 1, XOpenDisplay (display=0x0) at /var/tmp/portage/x11-libs/libX11-1.4.4/work/libX11-1.4.4/src/OpenDis.c:66 66 /var/tmp/portage/x11-libs/libX11-1.4.4/work/libX11-1.4.4/src/OpenDis.c: No such file or directory. in /var/tmp/portage/x11-libs/libX11-1.4.4/work/libX11-1.4.4/src/OpenDis.c (gdb) bt #0 XOpenDisplay (display=0x0) at /var/tmp/portage/x11-libs/libX11-1.4.4/work/libX11-1.4.4/src/OpenDis.c:66 #1 0x00007fffefcffda7 in Open (p_this=0x6cd698, isDialogProvider=false) at qt4.cpp:345 Now I see that XOpenDisplay has been called by Open in qt4.cpp, thus from the qt4 interface of vlc. Ok, but : (gdb) b XOpenDisplay Function "XOpenDisplay" not defined. Make breakpoint pending on future shared library load? (y or [n]) When saying yes : Breakpoint 1 (XOpenDisplay) pending. (gdb) run Starting program: /usr/bin/vlc [Thread debugging using libthread_db enabled] VLC media player 1.1.12 The Luggage (revision exported) [New Thread 0x7fffcd9a6700 (LWP 27740)] Blocked: call to unsetenv("DBUS_ACTIVATION_ADDRESS") Blocked: call to unsetenv("DBUS_ACTIVATION_BUS_TYPE") [New Thread 0x7fffcd8a5700 (LWP 27741)] [New Thread 0x7fffcd7a4700 (LWP 27742)] Breakpoint 1, XOpenDisplay (display=0x7fffffffef33 ":0") at /var/tmp/portage/x11-libs/libX11-1.4.4/work/libX11-1.4.4/src/OpenDis.c:66 66 /var/tmp/portage/x11-libs/libX11-1.4.4/work/libX11-1.4.4/src/OpenDis.c: Aucun fichier ou dossier de ce type. in /var/tmp/portage/x11-libs/libX11-1.4.4/work/libX11-1.4.4/src/OpenDis.c you should say yes, then compare: (In reply to comment #5) > Breakpoint 1, XOpenDisplay (display=0x7fffffffef33 ":0") > at > /var/tmp/portage/x11-libs/libX11-1.4.4/work/libX11-1.4.4/src/OpenDis.c:66 > 66 /var/tmp/portage/x11-libs/libX11-1.4.4/work/libX11-1.4.4/src/OpenDis.c: > Aucun fichier ou dossier de ce type. > in /var/tmp/portage/x11-libs/libX11-1.4.4/work/libX11-1.4.4/src/OpenDis.c with: (In reply to comment #3) > Breakpoint 1, XOpenDisplay (display=0x0) at > /var/tmp/portage/x11-libs/libX11-1.4.4/work/libX11-1.4.4/src/OpenDis.c:66 > 66 /var/tmp/portage/x11-libs/libX11-1.4.4/work/libX11-1.4.4/src/OpenDis.c: > No such file or directory. > in /var/tmp/portage/x11-libs/libX11-1.4.4/work/libX11-1.4.4/src/OpenDis.c > > (gdb) bt > > #0 XOpenDisplay (display=0x0) at > /var/tmp/portage/x11-libs/libX11-1.4.4/work/libX11-1.4.4/src/OpenDis.c:66 > #1 0x00007fffefcffda7 in Open (p_this=0x6cd698, isDialogProvider=false) at > qt4.cpp:345 > the 'bt' tells you where it comes from (removing x11@, shouldnt be needed to spam them now) Sorry, I forgot the bt ! (gdb) bt #0 XOpenDisplay (display=0x7fffffffef33 ":0") at /var/tmp/portage/x11-libs/libX11-1.4.4/work/libX11-1.4.4/src/OpenDis.c:66 #1 0x00007fffe2330251 in xosd_create (number_lines=1) at xosd.c:715 #2 0x00007fffe25349c3 in Open (p_this=0x6e56c0) at xosd.c:128 #3 0x0000003691a7ef75 in module_need (p_this=<optimized out>, psz_capability=0x3691a9ac87 "interface", psz_name=<optimized out>, b_strict=true) at modules/modules.c:559 #4 0x0000003691a3051d in intf_Create (p_this=<optimized out>, psz_module=<optimized out>) at interface/interface.c:128 #5 0x0000003691a20852 in libvlc_InternalInit (p_libvlc=0x605120, i_argc=2, ppsz_argv=0x7fffffffdc60) at libvlc.c:888 #6 0x0000003692207f02 in libvlc_new (argc=1, argv=<optimized out>) at control/core.c:58 #7 0x0000000000401290 in main (i_argc=1, ppsz_argv=0x7fffffffdeb8) at vlc.c:181 thanks, this should be fixed in 1.1.12-r1. please tell me if the problem disapears (if it does not, please attach a new backtrace :) ) It works ! You're my hero ! But what was the problem ( and the fix ) ? (In reply to comment #9) > It works ! You're my hero ! > But what was the problem ( and the fix ) ? the xosd plugin was opened first and didnt initialise multithreading support in libX11 while using it, later, when vlc would try to initialise it (because it requires it since its multithreaded), it wouldnt work correctly and lead to crashes. vlc developpers implemented a check for this and vlc aborts if it detects things happened like that, which check is what you hit. |