LWJGL Forum

Programming => Bug Reports / RFE => Topic started by: NkD on May 05, 2016, 07:08:49

Title: [SOLVED] Problem with GLFW.glfwInit - SetWindowIcon - LWJGL 3 nightly
Post by: NkD on May 05, 2016, 07:08:49
Exists some workaround if I get this error on GLFW.glfwInit ?

Exception in thread "main" java.lang.ExceptionInInitializerError
   at org.lwjgl.glfw.GLFW.glfwInit(GLFW.java:692)
   at cz.nkd.skeleton.platform.ui.window.WindowsRegistry.init(WindowsRegistry.java:39)
   at cz.nkd.skeleton.platform.ui.window.Window.<clinit>(Window.java:48)
   at cz.nkd.skeleton.platform.ui.window.WindowBuilder.build(WindowBuilder.java:79)
   at cz.nkd.skeleton.platform.ui.workbench.Workbench.start(Workbench.java:132)
   at cz.nkd.skeleton.Launcher.main(Launcher.java:12)
Caused by: java.lang.IllegalStateException: This function is not available.
   at org.lwjgl.system.Checks.checkFunctionAddress(Checks.java:89)
   at org.lwjgl.system.APIUtil.apiGetFunctionAddress(APIUtil.java:121)
   at org.lwjgl.glfw.GLFW$Functions.<clinit>(GLFW.java:594)
   ... 6 more

row org.lwjgl.glfw.GLFW$Functions.<clinit>(GLFW.java:594) is:
long SetWindowIcon = apiGetFunctionAddress(GLFW, "glfwSetWindowIcon"),

LWJGL 3.0.0-SNAPSHOT - (latest nightly, but problem appears about 3 weeks ago)

Title: Re: Problem with GLFW.glfwInit - SetWindowIcon - LWJGL 3 nightly
Post by: spasi on May 05, 2016, 09:57:17
Sounds like an old GLFW shared library is being loaded somehow. Try running with -Dorg.lwjgl.util.Debug=true and inspect the output. It will print the exact paths where shared libraries are loaded from.
Title: Re: [SOLVED] Problem with GLFW.glfwInit - SetWindowIcon - LWJGL 3 nightly
Post by: NkD on May 06, 2016, 22:15:06
You are right. It was a problem. thx