crashinvaders/gdx-texture-packer-gui

Crash report (Failed to load lwjgl library when clicking on "Add input files" button).

d-mokliakov opened this issue · 1 comments

Application Log
Version: 4.11.0
OS: Windows 10 10.0 amd64 (Windows 11 actually, crash report is lying)
JRE: 17.0.1 Oracle Corporation
GPU: NVIDIA GeForce RTX 2080 with Max-Q Design/PCIe/SSE2
OpenGL vendor: NVIDIA Corporation
OpenGL version: 4.6.0 NVIDIA 516.94
[ExtensionModuleRepositoryService] Cached data was loaded
[ConfigurationController] Incremental fonts are disabled
[GlobalShortcutHandler] Parsing shortcut file: hotkeys_default.txt
[SystemUtils] Recognized system configuration is Windows (x64)
[LWJGL] Failed to load a library. Possible solutions:
	a) Add the directory that contains the shared library to -Djava.library.path or -Dorg.lwjgl.librarypath.
	b) Add the JAR that contains the shared library to the classpath.
[LWJGL] Enable debug mode with -Dorg.lwjgl.util.Debug=true for better diagnostics.
[LWJGL] Enable the SharedLibraryLoader debug mode with -Dorg.lwjgl.util.DebugLoader=true for better diagnostics.
java.lang.RuntimeException: Actor: pifOnboardingBtnNew
|  Image: custom/ic-input-file-add
|  Label: Add input files: Add input files
	at com.badlogic.gdx.scenes.scene2d.Actor.notify(Actor.java:192)
	at com.badlogic.gdx.scenes.scene2d.Actor.fire(Actor.java:152)
	at com.badlogic.gdx.scenes.scene2d.ui.Button.setChecked(Button.java:125)
	at com.badlogic.gdx.scenes.scene2d.ui.Button$1.clicked(Button.java:93)
	at com.badlogic.gdx.scenes.scene2d.utils.ClickListener.touchUp(ClickListener.java:88)
	at com.badlogic.gdx.scenes.scene2d.InputListener.handle(InputListener.java:71)
	at com.badlogic.gdx.scenes.scene2d.Stage.touchUp(Stage.java:355)
	at com.crashinvaders.common.PrioritizedInputMultiplexer$Wrapper.touchUp(PrioritizedInputMultiplexer.java:136)
	at com.crashinvaders.common.PrioritizedInputMultiplexer.touchUp(PrioritizedInputMultiplexer.java:83)
	at com.badlogic.gdx.InputEventQueue.drain(InputEventQueue.java:70)
	at com.badlogic.gdx.backends.lwjgl3.DefaultLwjgl3Input.update(DefaultLwjgl3Input.java:189)
	at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Window.update(Lwjgl3Window.java:378)
	at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.loop(Lwjgl3Application.java:192)
	at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:166)
	at com.crashinvaders.texturepackergui.desktop.ApplicationStarter.start(ApplicationStarter.java:62)
	at com.crashinvaders.texturepackergui.desktop.ApplicationStarter.main(ApplicationStarter.java:35)
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: Unable to invoke method: com.badlogic.gdx.utils.reflect.Method@3e598df9 of object: com.crashinvaders.texturepackergui.controllers.main.inputfiles.PackInputFilesController@7e31ce0f
	at com.github.czyzby.lml.parser.impl.action.MethodActorConsumer.consume(MethodActorConsumer.java:41)
	at com.github.czyzby.lml.parser.impl.attribute.OnChangeLmlAttribute$1.changed(OnChangeLmlAttribute.java:29)
	at com.badlogic.gdx.scenes.scene2d.utils.ChangeListener.handle(ChangeListener.java:28)
	at com.badlogic.gdx.scenes.scene2d.Actor.notify(Actor.java:188)
	... 15 more
Caused by: com.badlogic.gdx.utils.reflect.ReflectionException: Exception occurred in method: addInputFiles
	at com.badlogic.gdx.utils.reflect.Method.invoke(Method.java:114)
	at com.github.czyzby.kiwi.util.gdx.reflection.Reflection.invokeMethod(Reflection.java:130)
	at com.github.czyzby.lml.parser.impl.action.MethodActorConsumer.consume(MethodActorConsumer.java:38)
	... 18 more
Caused by: java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at com.badlogic.gdx.utils.reflect.Method.invoke(Method.java:108)
	... 20 more
Caused by: java.lang.UnsatisfiedLinkError: Failed to locate library: lwjgl_nfd.dll
	at org.lwjgl.system.Library.loadSystem(Library.java:164)
	at org.lwjgl.util.nfd.LibNFD.<clinit>(LibNFD.java:17)
	at org.lwjgl.util.nfd.NFDPathSet.<clinit>(NFDPathSet.java:29)
	at com.crashinvaders.texturepackergui.desktop.LwjglFileDialogService.openMultipleFiles(LwjglFileDialogService.java:100)
	at com.crashinvaders.texturepackergui.controllers.main.inputfiles.PackInputFilesController.addInputFiles(PackInputFilesController.java:199)
	... 25 more

May I add some details here.

Minimum requirement
Windows 11

(Not sure about that, but as Tommy E. mentioned, it seems not to be reproducible with Win10)

Steps

  1. Close all GDX based applications
  2. Start a GDX app other than TP using a shell (e.g. gdx-liftoff)
  3. In that app open a native file dialog (close it immediately if you want)
  4. Start TP using a shell
  5. Open (or create) an atlas
  6. Use the button to add multiple single files (not the one for a folder)
    (You could also use the "Add Ignore Files" button - will be the same result)

TP should crash now (if you're on Windows 11).

Investigations has shown, the base issue is caused by lwjgl, as it tries to unpack lwjgl_nfd.dll to a temporary directory. If this file exists already and is in use by another app, an IOException is thrown, which is silently caught and wrapped into another one.

From my point of view TP cannot fix the issue, but may a workaround to prevent the crash would be available (as it is for "Add directory")