[SOLVED] SEVERE: Uncaught exception thrown in Thread[jME3 Main,5,main] java.lang.ExceptionInInitializerError

Hi everyone, I just remade a fresh install of my OS (Archlinux) and now I’m getting this problem in the engine.

May 17, 2017 9:27:52 AM com.jme3.app.LegacyApplication handleError
SEVERE: Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.ExceptionInInitializerError
	at com.jme3.system.lwjgl.LwjglDisplay.createContext(LwjglDisplay.java:112)
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:113)
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:211)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
	at org.lwjgl.opengl.LinuxDisplay.getAvailableDisplayModes(LinuxDisplay.java:951)
	at org.lwjgl.opengl.LinuxDisplay.init(LinuxDisplay.java:738)
	at org.lwjgl.opengl.Display.<clinit>(Display.java:138)
	... 4 more


Exception: java.lang.NullPointerException thrown from the UncaughtExceptionHandler in thread "jME3 Main"

Any idea of what could cause this?

(With any file, included the default main file of mygame package.)

Looks like a driver issue. The stack trace is coming from the Linux-specific LWJGL initialization… if LWJGL can’t init, something is very badly wrong.

I found a solution here: https://bbs.archlinux.org/viewtopic.php?id=221345

In my case I was missing this package xorg-xrandr.

Thanks for the gist anyway :smiley:

1 Like

Sounds like something from Star Trek

3 Likes