Bug 5423 - Deadlock in XGetExtensionVersion() when XInitThreads() is called before
Summary: Deadlock in XGetExtensionVersion() when XInitThreads() is called before
Status: RESOLVED DUPLICATE of bug 5424
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xi (show other bugs)
Version: 6.9.0
Hardware: x86 (IA32) Linux (All)
: high critical
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-26 11:20 UTC by Felix Hädicke
Modified: 2005-12-25 16:33 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.