problems on linux

Hi I’ve got the latest package off lwjgl.org (the unofficial one) wanting to try out Xith3D on LWJGL.

Alas I get a native crash when it tries to open a window.


 java org.lwjgl.test.WindowCreationTest
Found 4 display modes
 
Unexpected Signal : 11 occurred at PC=0x401E68F6
Function=(null)+0x401E68F6
Library=/usr/java/j2sdk1.4.2_03/jre/lib/i386/client/libjvm.so
 
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.Window.nCreate(Native Method)
        at org.lwjgl.opengl.Window.createWindow(Window.java:313)
        at org.lwjgl.opengl.Window.create(Window.java:291)
        at org.lwjgl.test.WindowCreationTest.main(WindowCreationTest.java:58)
 
Dynamic libraries:


When I run the tests, I get this message:


java org.lwjgl.test.DisplayTest
==== Test Current ====
Info about current:
Platform: GLX
Graphics card: null, version: null
Resolution: 1024x768x16@0Hz
---- Test Current ----
==== Test query ====
Retrieving available displaymodes
Found 4 modes
The first 5 are:
800 x 600 x 16 @0Hz
512 x 384 x 16 @0Hz
640 x 480 x 16 @0Hz
1024 x 768 x 16 @0Hz
---- Test query ----
==== Test setDisplayMode ====
Retrieving available displaymodes
Looking for 640x480x16@60...error
FATAL: Unable to find basic mode.

What does that mean and how do I fix it?

The native dump really shouldn’t happen anyway should it, is that a bug?

I am running Red Hat 9, on a laptop with software gl rendering (Mesa). Xith3D and JOGL work fine (almost all demos will run, if a little slow).

Thanks in advance,

Will.

LWJGL doesn’t allow software modes, since it doesn’t make sense in a gaming library. However we provide a hidden preference to allow software mode for developers working in software mode. Just set the property org.lwjgl.opengl.Window.allowSoftwareOpenGL to true, typically by passing:
-Dorg.lwjgl.opengl.Window.allowSoftwareOpenGL=true on the command line. I do however believe you will need the latest from cvs for that to work.

And the native crash you saw has been fixed in CVS already :slight_smile: It had something to do with me throwing multiple exceptions on one native call.

  • elias

[quote]And the native crash you saw has been fixed in CVS already :slight_smile: It had something to do with me throwing multiple exceptions on one native call.

  • elias
    [/quote]
    evil JNI :slight_smile:

Thanks for the info.

Now for my other test machine: GeForce2MX 400, Linux (Fedora 1) most things work except for the “Grass” demo:


java org.lwjgl.test.opengl.Grass
Display mode: 640 x 480 x 24 @0Hz
Created display.
Created OpenGL.
Vertex program supported: true
java.io.IOException: Stream closed
        at java.io.BufferedInputStream.ensureOpen(BufferedInputStream.java:120)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:199)
        at org.lwjgl.test.opengl.Grass.loadFile(Grass.java:126)
        at org.lwjgl.test.opengl.Grass.main(Grass.java:149)
Exception in thread "main" java.lang.NullPointerException
        at org.lwjgl.test.opengl.Grass.main(Grass.java:150)

any idea why?

Cheers,

Will.

It needs a file (the vertex shader) from the res/ directory, try adding that to the classpath.

  • elias

actually it’s in /src/java/org/lwjgl/test/opengl/ - so including /src/java in the classpath will do?

ta :slight_smile:

Will.