mbrlabs/Mundus

The project can't be run on MacOS X

Closed this issue · 1 comments

Hi,
Considering you've switched this project to use LWJGL3, these changes require passing additional property to JVM on MacOS X( any 7\8 jvm will fail): -XstartOnFirstThread
Otherwise application fails during the start with the following:
Exception in thread "main" java.lang.ExceptionInInitializerError at org.lwjgl.glfw.GLFW.glfwShowWindow(GLFW.java:1689) at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Window.setVisible(Lwjgl3Window.java:174) at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.createWindow(Lwjgl3Application.java:326) at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:92) at com.mbrlabs.mundus.Main.main(Main.java:40) Caused by: java.lang.IllegalStateException: Please run the JVM with -XstartOnFirstThread and make sure a window toolkit other than GLFW (e.g. AWT or JavaFX) is not initialized. at org.lwjgl.glfw.EventLoop$OnScreen.<clinit>(EventLoop.java:64) ... 5 more

The fix that worked for me was modification of the editor/build.gradle script with extension of the task run with the following:
jvmArgs "-XstartOnFirstThread"
There is another issue with LWJGL3 and keyboard input that I will post separately.

Hi krukhlis,
thanks for the report. Unfortunally i don't have a mac. Maybe you can make a pull request if this fix works for you.