Bug 5423

Summary: Deadlock in XGetExtensionVersion() when XInitThreads() is called before
Product: xorg Reporter: Felix Hädicke <felixhaedicke>
Component: Lib/XiAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED DUPLICATE QA Contact:
Severity: critical    
Priority: high    
Version: 6.9.0   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Felix Hädicke 2005-12-26 11:20:55 UTC
There is a bug that calling XGetExtensionVersion() after XInitThreads() always   
causes a deadlock.   
   
I do not really use XGetExtensionVersion() myself, but I found a deadlock in  
the Qt library in the QApplication constructor, and this seems to be caused by   
XGetExtensionVersion() and happens only if XInitThreads() is called before.   
According to this forum posting (which is probably the same bug):   
http://www.qt-forum.org/thread.php?threadid=14988&sid=e99b9990f5fbbec62dc5e650d36b160f&hilight=XInitThreads   
this did not happen in XFree 4.3 - but I have not tried this myself, so I  
cannot confirm this. The bug can be reproduced with X.org 6.8.2 and X.org 6.9  
with the following test program:  
   
Simple test program test.c to reproduce this bug:     
---------------------------------------------     
     
#include <X11/Xlib.h>      
#include <X11/extensions/XInput.h>      
      
int main(int argc, char * argv[]) {      
        XInitThreads();      
        Display * dpy = XOpenDisplay(NULL);      
        XGetExtensionVersion (dpy, "XInputExtension");      
        return 0;      
}      
     
---------------------------------------------     
     
gcc -I/usr/include/X11 -L/usr/X11R6/lib -lXs11 -lXi -lpthread test.c -o test
Comment 1 Felix Hädicke 2005-12-26 11:33:47 UTC
Sorry, posted 2 times. 

*** This bug has been marked as a duplicate of 5424 ***

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.