Window.create(...) fails?

Started by texel, November 02, 2003, 19:59:35

Previous topic - Next topic

texel

We are in Redhat 9 using lwjgl version 0.7.
If we create and destroy windows twice and then try to create another one we get this

error:java.lang.Exception: Could not load gl libs
       at org.lwjgl.opengl.Window.nCreate(Native Method)
       at org.lwjgl.opengl.Window.createWindow(Window.java:312)
       at org.lwjgl.opengl.Window.create(Window.java:254)
       at org.lwjgl.test.opengl.FullScreenWindowedTest.processKeyboard(FullScreenWindowedTest.java:210)
       at org.lwjgl.test.opengl.FullScreenWindowedTest.mainLoop(FullScreenWindowedTest.java:125)
       at org.lwjgl.test.opengl.FullScreenWindowedTest.execute(FullScreenWindowedTest.java:82)
       at org.lwjgl.test.opengl.FullScreenWindowedTest.main(FullScreenWindowedTest.java:336)

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x4D04714C
Function=[Unknown.]
Library=(N/A)

NOTE: We are unable to locate the function name symbol for the error
     just occurred. Please refer to release documentation for possible
     reason and solutions.


Current Java thread:
       at org.lwjgl.opengl.CoreGL11.glClear(Native Method)
       at org.lwjgl.test.opengl.FullScreenWindowedTest.render(FullScreenWindowedTest.java:176)
       at org.lwjgl.test.opengl.FullScreenWindowedTest.mainLoop(FullScreenWindowedTest.java:129)
       at org.lwjgl.test.opengl.FullScreenWindowedTest.execute(FullScreenWindowedTest.java:82)
       at org.lwjgl.test.opengl.FullScreenWindowedTest.main(FullScreenWindowedTest.java:336)

darkprophet

why are you using redhat by the way?

debian is better suited to this, try debian (or even better, FreeBSD 4.8) and see how that goes.

are you using nVidia's drivers or the standard ones (nv)?

Matzon

uhm, why would Debian be more suited over the most used linux distribution??

elias

That's a known problem with later C libs, nvidia drivers and the JVM (at least I know about it :P). Unloading and loading the libGL.so and nothing else crashes too. I'm not sure what to do about it, I might disable unloading of libGL.so altogether (so it will only load once per run).

- elias

elias

Well, for what it's worth, creating and destroying the window works in SUSE 9 that I upgraded to a few weeks ago. At least on NVIDIA boards :-)

- elias

xylo

I'm using Debian and lwjgl 0.9 alpha.

My problem seems to be related to this thread. I get the following error message when trying to run a simple lwjgl example (WindowCreationTest).

$ java -cp lwjgl.jar:lwjgl_test.jar: org.lwjgl.test.WindowCreationTest
Found 14 display modes
org.lwjgl.LWJGLException: Could not load gl libs
        at org.lwjgl.opengl.Window.nCreate(Native Method)
        at org.lwjgl.opengl.Window.createWindow(Unknown Source)
        at org.lwjgl.opengl.Window.create(Unknown Source)
        at org.lwjgl.test.WindowCreationTest.main(Unknown Source)
Unable to create window!, exiting...


OpenAL works fine, but all examples using OpenGL crash. The problem occurs every time I try to create a window (there is no need to create a window twice).

What gl libs does lwjgl search for and where does it search ?
("libGL.so.1" is located in /usr/lib/)
Every other (non java) OpenGL program runs on my system (for example glxgears).

Any help would be appreciated.

Thank you,
xylo

elias

Try running the example again, with this argument added:

-Dorg.lwjgl.Sys.debug=true

it should give a more precise reason.

- elias

xylo

$ java -cp lwjgl.jar:lwjgl_test.jar: -Dorg.lwjgl.Sys.debug=true org.lwjgl.test.WindowCreationTest
XF86VidMode extension version 2.2
Saved width, height 1280, 1024
XF86VidMode extension version 2.2
Adapter: null Version: null
XF86VidMode extension version 2.2
Removed 21 duplicate displaymodes
Found 14 display modes
Error loading libGL.so.1: libGL.so.1: cannot handle TLS data
org.lwjgl.LWJGLException: Could not load gl libs
        at org.lwjgl.opengl.Window.nCreate(Native Method)
        at org.lwjgl.opengl.Window.createWindow(Unknown Source)
        at org.lwjgl.opengl.Window.create(Unknown Source)
        at org.lwjgl.test.WindowCreationTest.main(Unknown Source)
Unable to create window!, exiting...
XF86VidMode extension version 2.2
Mode 0: 1280x1024

cfmdobbie

Ah, the old Thread Local Storage problem!  I'm guessing you've got an NVIDIA graphics card?  From what I hear, if you have a recent kernel the drivers attempt to use their TLS versions, which then fail because of a bug in glibc. :roll:

Check for updated graphics drivers, and check any readmes that came with your current set - I believe there is a simple workaround.  The only other alternative is to downgrade glibc, which would probably be a little, um, disruptive!
ellomynameis Charlie Dobbie.

xylo

Thanks!

I've updated my nvidia driver with option --force-tls=classic and now the creation of the window works, but now I've this new problem:

$ java -cp lwjgl.jar:lwjgl_test.jar: -Dorg.lwjgl.Sys.debug=true org.lwjgl.test.WindowCreationTest
XF86VidMode extension version 2.2
Saved width, height 1280, 1024
XF86VidMode extension version 2.2
Adapter: null Version: null
XF86VidMode extension version 2.2
Removed 21 duplicate displaymodes
Found 14 display modes
Created window
Pixel format info: r = 5, g = 6, b = 5, a = 0, depth = 16, stencil = 0, sample buffers = 0, samples = 0
org.lwjgl.LWJGLException: Controller not implemented
        at org.lwjgl.input.Controller.nCreate(Native Method)
        at org.lwjgl.input.Controller.create(Unknown Source)
        at org.lwjgl.opengl.Window.createWindow(Unknown Source)
        at org.lwjgl.opengl.Window.create(Unknown Source)
        at org.lwjgl.test.WindowCreationTest.main(Unknown Source)
Window created
240, 320, WindowCreationTest

elias

That exception dump is simply because... well.. there's no Controller support on linux. You can safely ignore it (and it will go away if you remove the debug flag from the cmd line).

- elias