manuedison

there is an error when try to load animations on LIBGDX with mesh attachments. on spine 3.8.76 and 3.8.55.1 runtime.
please help me to fix this error.



Exception in thread "LWJGL Application" com.badlogic.gdx.utils.SerializationException: Error reading attachment: Layer 3, skin: default
at com.esotericsoftware.spine.SkeletonJson.readSkeletonData(SkeletonJson.java:304)
at com.stem.game.managers.Assets.UseGameAssets(Assets.java:777)
at com.stem.game.states.Play.checkload(Play.java:753)
at com.stem.game.states.Play.update(Play.java:4151)
at com.stem.game.handlers.GameStateManager.update(GameStateManager.java:88)
at com.stem.game.main.Game.render(Game.java:108)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:225)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:126)
Caused by: java.lang.NoSuchFieldError: degrees
at com.esotericsoftware.spine.attachments.MeshAttachment.updateUVs(MeshAttachment.java:82)
at com.esotericsoftware.spine.SkeletonJson.readAttachment(SkeletonJson.java:416)
at com.esotericsoftware.spine.SkeletonJson.readSkeletonData(SkeletonJson.java:301)
... 7 more
manuedison
  • Posts: 29

badlogic

Looks like you are using a very old libGDX version. We made changes to libGDX's TextureAtlas and related classes in later version. I believe 0.99 should have the changes.
User avatar
badlogic

Mario
  • Posts: 2168

manuedison

I am using LibGdx 1.9.9, I have no problems in loading attachments without mesh, this error happens only when I include the mesh,
manuedison
  • Posts: 29

Nate

at com.esotericsoftware.spine.attachments.MeshAttachment.updateUVs(MeshAttachment.java:82)
That line is trying to access AtlasRegion#degrees. Whatever version of libgdx you are using is not able to find the degrees field on com.badlogic.gdx.graphics.g2d.TextureAtlas.AtlasRegion. I'm 100% sure that you have old libgdx classes in your classpath that are lacking this field.
User avatar
Nate

Nate
  • Posts: 9333


Return to Bugs