Dropping OpenGL after Burning causes exit(1) on Linux

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Dropping OpenGL after Burning causes exit(1) on Linux

Post by rogerborg »

Irrlicht 1.5 beta SVN 1921, Ubuntu 8.04 (running under VmWare, but I'm not seeing any other problems):

Initially I'm looking for replication, or refutation, on a proper native Linux system. Is this happening to anyone else?

Code: Select all

int main()
{
	irr::IrrlichtDevice *device = irr::createDevice( irr::video::EDT_BURNINGSVIDEO);
	if(device)
		device->drop();
	device = irr::createDevice( irr::video::EDT_OPENGL);
	if(device)
		device->drop(); // exits here with code 1

	// ... never reached
}
Output:

Code: Select all

Irrlicht Engine version 1.5.beta
Linux 2.6.24-22-generic #1 SMP Mon Nov 24 18:32:42 UTC 2008 i686
Irrlicht Engine version 1.5.beta
Linux 2.6.24-22-generic #1 SMP Mon Nov 24 18:32:42 UTC 2008 i686
Using renderer: OpenGL 1.4
Mesa GLX Indirect: Mesa project: www.mesa3d.org
OpenGL driver version is 1.2 or better.
GLSL not available.
The exit appears to be happening inside CIrrDeviceLinux::~CIrrDeviceLinux() on this line:

Code: Select all

XCloseDisplay(display);
It doesn't happen with EDT_SOFTWARE / EDT_OPENGL, or EDT_OPENGL / EDT_OPENGL or EDT_BURNINGSVIDEO / EDT_BURNINGSVIDEO or any other combination that I've found, just EDT_BURNINGSVIDEO / EDT_OPENGL.

[UPDATE] I lies. It also happens with EDT_DIRECT3D8 / EDT_OPENGL, but not EDT_DIRECT3D9 / EDT_OPENGL, even though neither driver is compiled into this (Linux) build.

Any ideas?
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
randomMesh
Posts: 1186
Joined: Fri Dec 29, 2006 12:04 am

Post by randomMesh »

rogerborg wrote:Looks like there's an issue with that function, at least on this particular version of Ubuntu. I'll upgrade to 8.10 and see what happens.
I tested your code with Ubuntu 8.10.
It still doesn't work.
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Thanks for verifying it. Well, that's a bad of dicks, and no mistake.

It's unlikely to be much of an issue for user apps, but it's buggering up my unit tests, and we should be aware of it.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
pc0de
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Post by pc0de »

hmm, it doesn't appear to be a problem on 8.10 for me:

Code: Select all

irr::IrrlichtDevice *device = irr::createDevice( irr::video::EDT_BURNINGSVIDEO);
if(device)
    device->drop();
device = irr::createDevice( irr::video::EDT_OPENGL);
if(device)
    device->drop(); // exits here with code 1
printf("reached.\n");
// ... never reached 
Output:

Code: Select all

Irrlicht Engine version 1.5.beta
Linux 2.6.27-9-generic #1 SMP Thu Nov 20 21:57:00 UTC 2008 i686
Creating X window...
Visual chosen: : 33
Irrlicht Engine version 1.5.beta
Linux 2.6.27-9-generic #1 SMP Thu Nov 20 21:57:00 UTC 2008 i686
Creating X window...
Visual chosen: : 39
Using renderer: OpenGL 2.1.2
GeForce 6800 GT/PCI/SSE2/3DNOW!: NVIDIA Corporation
OpenGL driver version is 1.2 or better.
GLSL version: 1.3
reached.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Note that rogerborg is using Mesa and pc0de has direct acceleration. Is randommesh running mesa too?
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
randomMesh
Posts: 1186
Joined: Fri Dec 29, 2006 12:04 am

Post by randomMesh »

Here's another output from another machine with Ubuntu 8.10.
This time all works fine...

Code: Select all

int main()
{
	irr::IrrlichtDevice *device = irr::createDevice(irr::video::EDT_BURNINGSVIDEO);
	if(device)
	    device->drop();

	device = irr::createDevice(irr::video::EDT_OPENGL);
	if(device)
	    device->drop(); // exits here with code 1

	printf("reached.\n");
	// ... never reached

	return 0;
}
Output:

Code: Select all

Irrlicht Engine version 1.5.beta
Linux 2.6.27-7-generic #1 SMP Tue Nov 4 19:33:20 UTC 2008 i686
Irrlicht Engine version 1.5.beta
Linux 2.6.27-7-generic #1 SMP Tue Nov 4 19:33:20 UTC 2008 i686
Using renderer: OpenGL 1.4
Mesa DRI Intel(R) 945G 20061102 x86/MMX/SSE2: Tungsten Graphics, Inc
OpenGL driver version is 1.2 or better.
GLSL not available.
reached.
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Thanks guys. I can confirm that 8.10 is better, but it still exits eventually after enough device create/drops. I guess I might try forking or threading in the tests and see if that helps.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Post Reply