Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can start the app: java.lang.ArrayIndexOutOfBoundsException: 0 #43

Closed
BrunoSalerno opened this issue Feb 27, 2016 · 6 comments
Closed
Labels

Comments

@BrunoSalerno
Copy link

I'm getting this in Ubuntu:

$ java -jar METRO_0.1.3_alpha.jar 
Exception in thread "LWJGL Application" java.lang.ExceptionInInitializerError
    at com.badlogic.gdx.backends.lwjgl.LwjglGraphics.setVSync(LwjglGraphics.java:446)
    at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:118)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
    at org.lwjgl.opengl.XRandR.findPrimary(XRandR.java:326)
    at org.lwjgl.opengl.XRandR.ScreentoDisplayMode(XRandR.java:315)
    at org.lwjgl.opengl.LinuxDisplay$3.run(LinuxDisplay.java:746)
    at org.lwjgl.opengl.LinuxDisplay$3.run(LinuxDisplay.java:743)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.lwjgl.opengl.LinuxDisplay.init(LinuxDisplay.java:743)
    at org.lwjgl.opengl.Display.<clinit>(Display.java:138)
    ... 2 more
AL lib: (EE) alc_cleanup: 1 device not closed
@hauke96 hauke96 added the bug label Feb 27, 2016
@hauke96
Copy link
Owner

hauke96 commented Feb 27, 2016

Hi thanks for the report.
What hardware do you use (especially graphics card, the resolution of your screen, the amount of screens, etc.)?
Try to turn of the vsync, so set use.vsync=true in the settings.cfg file to use.vsync=false, because the problem startes in the com.badlogic.gdx.backends.lwjgl.LwjglGraphics.setVSync(LwjglGraphics.java:446).
Are you using xrandr for your screen config stuff?

@BrunoSalerno
Copy link
Author

I set use.vsync=false in the config file but I still get the same error.
I think I'm using xrandr, yes. My OS is Ubuntu 14.4 (32 bits). My video card is an Intel Haswell integrated GPU.

@hauke96
Copy link
Owner

hauke96 commented Feb 27, 2016

How many monitors are you using and what resolution does it/do they have?

@BrunoSalerno
Copy link
Author

Just one, 1440x900. I tried modifying the resolution in settings.cfg to 800x600 but I still got the error.

@hauke96
Copy link
Owner

hauke96 commented Feb 27, 2016

Hm, that's kinda interesting ...
I don't know if this helps, but maybe xrandr has no primary monitor.
If the output of xrandr --current does not show any primary monitor (something like DVI-D-0 connected primary 1920x1080+0+0 ...) then try to set it with xrandr --output (for me the device is DVI-D-0so the command is xrandr --output DVI-D-0 --primary).
When there is an primary monitor set, check if it's the right one and possibly change it.

@hauke96
Copy link
Owner

hauke96 commented May 1, 2016

Closed due to inactivity and not a METRO but a LibGDX issue.

@hauke96 hauke96 closed this as completed May 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants