Author Topic: lwjgl 2.4.2 fails on linux  (Read 2581 times)

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
lwjgl 2.4.2 fails on linux
« on: June 23, 2010, 10:17:39 pm »
hi,

hello world GL example in latest release (1.21) doesn't launch. it throws the exception below. it runs ok in previous versions including 1.21 alpha. i guess this is related to LWJGL 2.4.2

Quote
Exception in thread "main" java.lang.ExceptionInInitializerError
   at com.threed.jpct.GLHelper.findMode(Unknown Source)
   at com.threed.jpct.GLHelper.findMode(Unknown Source)
   at com.threed.jpct.GLHelper.init(Unknown Source)
   at com.threed.jpct.GLRenderer.init(Unknown Source)
   at com.threed.jpct.FrameBuffer.enableRenderer(Unknown Source)
   at com.threed.jpct.FrameBuffer.enableRenderer(Unknown Source)
   at com.threed.jpct.FrameBuffer.enableRenderer(Unknown Source)
   at HelloWorldOGL.loop(HelloWorldOGL.java:37)
   at HelloWorldOGL.main(HelloWorldOGL.java:15)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
   at org.lwjgl.opengl.XRandR$Screen.<init>(XRandR.java:234)
   at org.lwjgl.opengl.XRandR$Screen.<init>(XRandR.java:196)
   at org.lwjgl.opengl.XRandR.populate(XRandR.java:87)
   at org.lwjgl.opengl.XRandR.access$100(XRandR.java:52)
   at org.lwjgl.opengl.XRandR$1.run(XRandR.java:110)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.lwjgl.opengl.XRandR.getConfiguration(XRandR.java:108)
   at org.lwjgl.opengl.LinuxDisplay.init(LinuxDisplay.java:618)
   at org.lwjgl.opengl.Display.<clinit>(Display.java:135)
   ... 9 more

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: lwjgl 2.4.2 fails on linux
« Reply #1 on: June 23, 2010, 10:24:40 pm »
Looks like as if it fails on this call:

Code: [Select]
Display.getAvailableDisplayModes();

because that's the only lwjgl related thing that GLHelper.findMode() does. Maybe you can write a simple test case that does this call and see what happens then!?

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: lwjgl 2.4.2 fails on linux
« Reply #2 on: June 23, 2010, 10:37:02 pm »
yes, that call fails with same exception

Code: [Select]
Exception in thread "main" java.lang.ExceptionInInitializerError
at tmp.LWTest.main(LWTest.java:17)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at org.lwjgl.opengl.XRandR$Screen.<init>(XRandR.java:234)
at org.lwjgl.opengl.XRandR$Screen.<init>(XRandR.java:196)
at org.lwjgl.opengl.XRandR.populate(XRandR.java:87)
at org.lwjgl.opengl.XRandR.access$100(XRandR.java:52)
at org.lwjgl.opengl.XRandR$1.run(XRandR.java:110)
at java.security.AccessController.doPrivileged(Native Method)
at org.lwjgl.opengl.XRandR.getConfiguration(XRandR.java:108)
at org.lwjgl.opengl.LinuxDisplay.init(LinuxDisplay.java:618)
at org.lwjgl.opengl.Display.<clinit>(Display.java:135)
... 1 more

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: lwjgl 2.4.2 fails on linux
« Reply #3 on: June 23, 2010, 10:47:35 pm »
Looks like an issue for the lwjgl forum then... ;)

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: lwjgl 2.4.2 fails on linux
« Reply #4 on: June 23, 2010, 10:58:07 pm »