Bug 7232

Summary: X crashes after odd initialization of two opengl windows using QT
Product: xorg Reporter: Shy Shalom <shooshX>
Component: Server/GeneralAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED WORKSFORME QA Contact: Xorg Project Team <xorg-team>
Severity: major    
Priority: high CC: freedesktop-bugzilla, jeremyhu
Version: 7.0.0Keywords: want-backtrace
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard: 2011BRB_Reviewed
i915 platform: i915 features:

Description Shy Shalom 2006-06-14 14:33:26 UTC
using QT 4.1.2, running the following piece of code causes X to crash:

#include <QApplication>
#include <QGLWidget>

int main(int argc, char *argv[])
{
	QApplication app(argc, argv);
	QWidget window;

	QGLWidget *gl1 = new QGLWidget(&window);

	QGLWidget *gl2 = new QGLWidget((QWidget*)NULL);
	gl2->makeCurrent();
	gl2->setParent(&window);
	
	window.show();

	gl1->makeCurrent();

	return 0;
}

X crashes on the last makeCurrent() call.
Constructing the second QGLWidget with &window instead of NULL prevents the crash.
running on:
QT 4.1.2, using a slightly modified code that compiles with QT 3.3.5 doesn't
seem to crash.
Xorg 7.0.0
Fedora Core 5 (2.6.16-1.2111_FC5)
on VMware
Comment 1 Daniel Stone 2007-02-27 01:32:32 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 2 Jeremy Huddleston Sequoia 2011-10-02 02:24:11 UTC
Sorry for not getting back to you sooner.  Is this still an issue with recent 
servers?  If so, can you please attach a backtrace?
Comment 3 Jeremy Huddleston Sequoia 2011-10-11 11:49:56 UTC
See http://www.x.org/wiki/Development/Documentation/ServerDebugging for 
instructions on how to provide useful information.

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.