when I try to run projects, I got the following error immediatly after splash screen :
run:
mai 26, 2017 2:53:22 PM com.jme3.system.JmeDesktopSystem initialize
INFOS: Running on jMonkeyEngine 3.1-stable
* Branch: HEAD
* Git Hash: af04bf9
* Build Date: 2017-02-19
mai 26, 2017 2:53:22 PM com.jme3.app.LegacyApplication handleError
GRAVE: 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"
BUILD SUCCESSFUL (total time: 7 seconds)
I use 3.1-stable, as stack show, and run it on up to date archlinux with gnome. Even the “Basic Game” project throw the error. Error is thrown at the first call to org.lwjgl.opengl.Display class.
After some test, bug is not on archlinux : I repack the project with a Maven shaded jar, and lwjgl don’t crash, without any code change. But I got error :
mai 28, 2017 9:38:50 AM com.jme3.system.JmeDesktopSystem initialize
INFOS: Running on jMonkeyEngine 3.1-stable
* Branch: HEAD
* Git Hash: af04bf9
* Build Date: 2017-02-13
mai 28, 2017 9:38:51 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFOS: LWJGL 3.0.0b SNAPSHOT context running on thread main
* Graphics Adapter: GLFW 3.2.0 X11 GLX clock_gettime /dev/js XI Xf86vm shared
mai 28, 2017 9:38:51 AM com.jme3.renderer.opengl.GLRenderer loadCapabilitiesCommon
INFOS: OpenGL Renderer Information
* Vendor: NVIDIA Corporation
* Renderer: GeForce GTX 1070/PCIe/SSE2
* OpenGL Version: 3.2.0 NVIDIA 378.13
* GLSL Version: 1.50 NVIDIA via Cg compiler
* Profile: Core
X Error of failed request: RenderBadPicture (invalid Picture parameter)
Major opcode of failed request: 139 (RENDER)
Minor opcode of failed request: 7 (RenderFreePicture)
Picture id in failed request: 0x3e00024
Serial number of failed request: 3528
Current serial number in output stream: 3543
It looks like this one is related to the splashscreen : with AppSettings#setShowSettings(false), it do not happen, and everything is fine…
Confirmed on Xubuntu 16.04. It is a bug in LWJGL for the version that JME uses, related to the kernel detecting multiple video outputs even if only one monitor is connected.
Ok, but if I launch in SDK the “Basic Game” project, with AppSettings#setShowSettings(false) as the only modification, I got the first error. So this one is not related to splashscreen…
mei 30, 2017 1:17:54 PM com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 3.1-stable
* Branch: HEAD
* Git Hash: af04bf9
* Build Date: 2017-02-19
mei 30, 2017 1:17:54 PM 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
When using Maven instead of Ant, as @Cafeinoman suggested, I get the same results:
--- exec-maven-plugin:1.2.1:exec (default-cli) @ BasicGame ---
mei 30, 2017 2:27:05 PM com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 3.1-stable
* Branch: HEAD
* Git Hash: af04bf9
* Build Date: 2017-02-13
mei 30, 2017 2:27:05 PM 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"
------------------------------------------------------------------------
BUILD SUCCESS
------------------------------------------------------------------------
Total time: 7.611s
Finished at: Tue May 30 14:27:09 CEST 2017
Final Memory: 6M/106M
------------------------------------------------------------------------
(Sorry for adding this to a previous post instead of simply replying, but as a new user am I not allowed more than three posts per topic ).