You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like -XstartOnFirstThread is the only really reliable way to have LWJGL3 work on MacOS. The StartOnFirstThreadHelper class from Guacamole may make distributing executable JARs easier -- just start your main() method with if (StartOnFirstThreadHelper.startNewJvmIfRequired()) return; and that file takes care of restarting with the necessary argument if it isn't already there. Distributing with Packr or jpackage means users don't need a JDK installed (which can be tricky on MacOS, because of x64 and ARM64 both being used), and both of those can specify -XstartOnFirstThread as an argument when launched via the .app . The need for -XstartOnFirstThread is mostly an issue during development, when JARs are being sent around but not yet packaged with JREs for distribution. Hopefully the class from Guacamole (which really just needs that file, not the library) can help.
I don't think this is as easy to fix as you'd like it to be, but the best place to start looking is the original PR that introduced the extension (#6772).
Apart from that, you could try removing the gdx-lwjgl3-glfw-awt-macos extension and doing this at the beginning of your DesktopLauncher instead:
if (SharedLibraryLoader.isMac && Gdx.app == null) {
org.lwjgl.system.Configuration.GLFW_LIBRARY_NAME.set("glfw_async");
}
This should have the same effect as our extension, but is offered by LWJGL 3 itself. So they might be able to help you figure out what is causing this.
crykn
linked a pull request
Mar 8, 2024
that will
close
this issue
Not using the gdx-lwjgl3-glfw-awt library and using JVM opts "-XstartOnFirstThread" fixes the issue.
The text was updated successfully, but these errors were encountered: