lwjgl 3.3.0 glfw .UnsatisfiedLinkError

Started by matan45, November 17, 2021, 19:02:45

Previous topic - Next topic

matan45

hi i wanted to try the NFD lib so i take the come from this repo
https://github.com/LWJGL/lwjgl3/blob/master/modules/samples/src/test/java/org/lwjgl/demo/util/nfd/HelloNFD.java
and try it and on the 3.2.3 version is working just fine and when i wanted to try the new 3.3.0 version
is throw this Exception
Exception in thread "main" java.lang.UnsatisfiedLinkError: 'int org.lwjgl.system.libffi.FFIClosure.offsets(long)'
	at org.lwjgl.system.libffi.FFIClosure.offsets(Native Method)
	at org.lwjgl.system.libffi.FFIClosure.<clinit>(FFIClosure.java:48)
	at org.lwjgl.system.Callback.<clinit>(Callback.java:43)
	at app.boot.Run.helloNFD(Run.java:46)
	at app.boot.Run.main(Run.java:35)

matan45

is on the GLFWErrorCallback.createPrint(System.err).set(); function

spasi

Try running your app with -Dorg.lwjgl.util.Debug=true -Dorg.lwjgl.util.DebugLoader=true. It will print some output that will likely help you resolve the issue.

matan45

were do i add thoes commands in the intellij?

spasi

Run menu -> Edit configurations -> select your app -> Modify options -> Add VM options

(I'm on IDEA 2021.2.3)

matan45

[LWJGL] Version: 3.3.0 build 21
[LWJGL] 	 OS: Windows 10 v10.0
[LWJGL] 	JRE: Windows amd64 17.0.1
[LWJGL] 	JVM: Java HotSpot(TM) 64-Bit Server VM v17.0.1+12-LTS-39 by Oracle Corporation
[LWJGL] Loading JNI library: lwjgl
[LWJGL] 	Module: org.lwjgl
[LWJGL] 	Using SharedLibraryLoader...
[LWJGL] 	Found at: C:\Users\matan\AppData\Local\Temp\lwjglmatan\3.3.0-build-21\lwjgl.dll
[LWJGL] 	Loaded from org.lwjgl.librarypath: C:\Users\matan\AppData\Local\Temp\lwjglmatan\3.3.0-build-21\lwjgl.dll
Exception in thread "main" java.lang.UnsatisfiedLinkError: 'int org.lwjgl.system.libffi.FFIClosure.offsets(long)'
	at org.lwjgl.system.libffi.FFIClosure.offsets(Native Method)
	at org.lwjgl.system.libffi.FFIClosure.<clinit>(FFIClosure.java:48)
	at org.lwjgl.system.Callback.<clinit>(Callback.java:43)
	at app.boot.Run.helloNFD(Run.java:45)
	at app.boot.Run.main(Run.java:35)

Lyssieth

Having the same issue, and haven't found any other resources relating to this. On Linux.

[LWJGL] Version: 3.3.0 build 21
[LWJGL] 	 OS: Linux v5.15.11-zen1-1-zen
[LWJGL] 	JRE: Linux amd64 17.0.1
[LWJGL] 	JVM: OpenJDK 64-Bit Server VM v17.0.1+12 by Oracle Corporation
[LWJGL] Loading JNI library: lwjgl
[LWJGL] 	Module: org.lwjgl
[LWJGL] 	Using SharedLibraryLoader...
[LWJGL] 	Found at: /tmp/lwjgllys/3.3.0-build-21/liblwjgl.so
[LWJGL] 	Loaded from org.lwjgl.librarypath: /tmp/lwjgllys/3.3.0-build-21/liblwjgl.so
java.lang.UnsatisfiedLinkError: 'int org.lwjgl.system.libffi.FFIClosure.offsets(long)'
	at org.lwjgl.system.libffi.FFIClosure.offsets(Native Method)
	at org.lwjgl.system.libffi.FFIClosure.<clinit>(FFIClosure.java:48)
	at org.lwjgl.system.Callback.<clinit>(Callback.java:43)
	at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.initializeGlfw(Lwjgl3Application.java:81)
	at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:91)
	at <package path hidden>.DesktopLauncher.main(DesktopLauncher.java:73)

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

spasi

I can't explain or reproduce this. Could someone prepare an MCVE? (preferably a simple github repo that I could clone and build/run easily)

Lyssieth

When I tired to make one it worked perfectly, so I think it might be something to do with my project. I'll have to do some more experimentation locally.