raeleus/skin-composer

Import Skin Error

Opened this issue · 7 comments

remake.zip
export.zip

If a skin project was created by importing from a .skin file, it will fail when open again.
Following errror:
com.badlogic.gdx.utils.SerializationException: Class cannot be created (missing no-arg constructor): com.badlogic.gdx.backends.lwjgl3.Lwjgl3FileHandle
Serialization trace:
file (com.ray3k.skincomposer.data.DrawableData)
at com.badlogic.gdx.utils.Json.newInstance(Json.java:1221)
at com.badlogic.gdx.utils.Json.readValue(Json.java:1009)
at com.badlogic.gdx.utils.Json.readFields(Json.java:902)
at com.badlogic.gdx.utils.Json.readValue(Json.java:1074)
at com.badlogic.gdx.utils.Json.readValue(Json.java:1097)
at com.badlogic.gdx.utils.Json.readValue(Json.java:945)
at com.ray3k.skincomposer.data.AtlasData.read(AtlasData.java:289)
at com.badlogic.gdx.utils.Json.readValue(Json.java:1012)
at com.badlogic.gdx.utils.Json.readValue(Json.java:930)
at com.ray3k.skincomposer.data.ProjectData.read(ProjectData.java:616)
at com.badlogic.gdx.utils.Json.readValue(Json.java:1012)
at com.badlogic.gdx.utils.Json.fromJson(Json.java:769)
at com.ray3k.skincomposer.data.ProjectData.load(ProjectData.java:404)
at com.ray3k.skincomposer.MainListener.lambda$openFile$3(MainListener.java:326)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.loop(Lwjgl3Application.java:154)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.(Lwjgl3Application.java:114)
at com.ray3k.skincomposer.desktop.DesktopLauncher.main(DesktopLauncher.java:404)
Caused by: com.badlogic.gdx.utils.reflect.ReflectionException: Could not instantiate instance of class: com.badlogic.gdx.backends.lwjgl3.Lwjgl3FileHandle
at com.badlogic.gdx.utils.reflect.ClassReflection.newInstance(ClassReflection.java:95)
at com.badlogic.gdx.utils.Json.newInstance(Json.java:1203)
... 16 more
Caused by: java.lang.InstantiationException: com.badlogic.gdx.backends.lwjgl3.Lwjgl3FileHandle
at java.base/java.lang.Class.newInstance(Unknown Source)
at com.badlogic.gdx.utils.reflect.ClassReflection.newInstance(ClassReflection.java:93)
... 17 more
Caused by: java.lang.NoSuchMethodException: com.badlogic.gdx.backends.lwjgl3.Lwjgl3FileHandle.()
at java.base/java.lang.Class.getConstructor0(Unknown Source)
... 19 more

the exact same error remained from version 37 to version 43.

Sorry for the inconvenience. Can you send me a project that reproduces the issue? If you need something working right away, I think the JAR version of the app works better for some reason.

I don't see any attachments here. I think you'll have to log into Github and upload them to the issue directly. Sorry!

yes yes I added it now.

Eek! This is a tough one. I fixed a related bug regarding fonts not being saved correctly from an imported skin. There were a number of images in your project that didn't exist. I deleted those manually in order to open your file. I still couldn't actually reproduce the LWJGL3 issue.

You can see my edited file here.
remake raeleus edit.zip

I suspect there are a number of imported files that didn't get copied correctly. I would suggest waiting for the next version and making a brand new project before you try importing any skins.