I'm having a strange problem when I try to run my program more then once. By more then once, I mean that I try to re-create a display, but my program never exits. The only thing it does is create a Display then destroy the display. When I run it again I get the following error:
Operating system: Linux version 2.6.22.19-desktop-2mdv
Operating system architecture: i386
Number of processors: 2
Screen adapter: null
Adapter driver version: null
Java vendor: Sun Microsystems Inc.
Java version: 1.6.0_06
Initializing OpenGL...FAILED!
org.lwjgl.LWJGLException: X Error - disp: 0x8497388 serial: 144 error: BadGC (invalid GC parameter) request_code: 60 minor_code: 0
at org.lwjgl.opengl.LinuxDisplay.globalErrorHandler LinuxDisplay.java-286
at org.lwjgl.opengl.LinuxContextImplementation.nCreate (Native Method)
at org.lwjgl.opengl.LinuxContextImplementation.create LinuxContextImplementation.java-50
at org.lwjgl.opengl.Context.<init> Context.java-113
at org.lwjgl.opengl.Display.create Display.java-783
at org.lwjgl.opengl.Display.create Display.java-733
at starliteGames.novaEngine.renderEngine.drawingAPIs.OpenGLApi.init OpenGLApi.java-188
at starliteGames.novaEngine.MainLoopThread.initializeRenderer MainLoopThread.java-65
at starliteGames.novaEngine.MainLoopThread.run MainLoopThread.java-89
Cleaning up...Done
Note that after each failure, the serial is different (I don't know if this is important).
I have no idea what it means, so I'm not sure how to go about debugging it. ;D
Any help would be great!
EDIT: forgot to say that if I completely exit my program and start it, it will work one time again before failing with the same error.
Did a little more testing. Decided to see if a simple test case would fail:
try{
Display.create();
}catch(Exception e){
e.printStackTrace();
}finally{
Display.destroy();
}
try{
Display.create();
}catch(Exception e){
e.printStackTrace();
}finally{
Display.destroy();
}
It crashes in the same way as my program, so I assume this is not a problem with my program.
There's no reason this shouldn't work, right? I'm just assuming that creating a display, destroying it, then creating it again should work.
Any one else getting this (it only happens in Linux)? Or is it just me?
I'll test later and report back.
Thanks for reporting this, it's been fixed in SVN.
- elias
Quote from: elias on June 16, 2008, 18:30:02
Thanks for reporting this, it's been fixed in SVN.
- elias
Its good to know it wasn't just me.
Thanks :)