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
Description:
When calling org.lwjgl.glfw.GLFW.glfwInit(), false is returned and a GLFW_PLATFORM_ERROR is thrown with it's description stating, that it failed to load libwayland-client.
Any help in resolving this would be greatly appreciated!
Steps To Reproduce:
Use a Linux system on Wayland
Run an application using LWJGL3
Observe the logs
Actual Behavior:
A following stack trace is printed and the program exists:
Full example Logs from an application using LWJGL:
> Task :SceneTest.main() FAILED
[ Info] Logging file at '/para/Projects/leEngine/javaengine/logs/2024-11-22-14-23-25 - 0.log'
[ Info] Setting up OpenGL and GLFW...
[ Debug] LWJGL Version: 3.3.4+7
[ Error] [LWJGL] GLFW_PLATFORM_ERROR error
Description : Wayland: Failed to load libwayland-client
Stacktrace :
org.lwjgl.glfw.GLFW.glfwInit(GLFW.java:1109)
org.app.core.GLManager.init(GLManager.java:31)
org.app.core.scene.SceneTest.main(SceneTest.java:38)
[ !Crit] Unable to initialize GLFW
Exception in thread "main" java.lang.RuntimeException: java.lang.IllegalAccessException: Unable to initialize GLFW
at org.app.utils.Logger.logAndThrow(Logger.java:126)
at org.app.utils.Logger.logAndThrow(Logger.java:131)
at org.app.core.GLManager.init(GLManager.java:32)
at org.app.core.scene.SceneTest.main(SceneTest.java:38)
Caused by: java.lang.IllegalAccessException: Unable to initialize GLFW
Caused by: java.lang.IllegalAccessException: Unable to initialize GLFW
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
... 3 more
Execution failed for task ':SceneTest.main()'.
> Process 'command '/home/luh/.nix-profile/bin/java'' finished with non-zero exit value 1
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
EDIT:
Upgrading to Gradle 8.11.1 and Java 23 did not fix anything
EDIT 2:
When setting a hint to use X11, to try and run the application through xwayland (glfwInitHint(GLFW_PLATFORM, GLFW_PLATFORM_X11);) a similar thing happens:
Question
Description:
When calling
org.lwjgl.glfw.GLFW.glfwInit()
, false is returned and aGLFW_PLATFORM_ERROR
is thrown with it's description stating, that it failed to loadlibwayland-client
.Any help in resolving this would be greatly appreciated!
Steps To Reproduce:
Actual Behavior:
A following stack trace is printed and the program exists:
Expected Behavior:
GLFW gets initialized and the program keeps running.
Environment:
Additional Context:
build.gradle
:EDIT:
Upgrading to Gradle 8.11.1 and Java 23 did not fix anything
EDIT 2:
When setting a hint to use X11, to try and run the application through xwayland (
glfwInitHint(GLFW_PLATFORM, GLFW_PLATFORM_X11);
) a similar thing happens:The text was updated successfully, but these errors were encountered: