• Bugs
  • [1.8.05 Professional] Animations in binary export

Started with the SpineBoy example, deleted the jump and head animations, leaving only the walk animation. When exporting to binary and trying to setup the skeleton in libGDX, it fails with the following error

Exception in thread "LWJGL Application" java.lang.IndexOutOfBoundsException: index can't be >= size: 3 >= 1
at com.badlogic.gdx.utils.Array.get(Array.java:127)
at com.esotericsoftware.spine.SkeletonBinary.readAnimation(SkeletonBinary.java:311)
at com.esotericsoftware.spine.SkeletonBinary.readSkeletonData(SkeletonBinary.java:157)
at com.x.y.Main.init(Main.java:541)
at com.x.y.Main.render(Main.java:161)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:208)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:115)

Seems like the number of animations isn't properly updated. Using JSON, it works like expected.

Related Discussions
...

There is a problem with Binary export at the moment. Hopefully Nate will be able to fix it tomorrow. He's been feeling a bit sick today and haven't been able to work too much. If possible stick with JSON for now.

Loading binary files should now be fix, please update spine-libgdx from GitHub.

3 mois plus tard

Hi. Problem is here again.
1.8.41 Pro, latest libgdx runtime. Json works good, but binary is broken.

If i just add mesh without keys and use SpriteBatch for render, it crash with:

Exception in thread "LWJGL Application" java.lang.RuntimeException: PolygonSpriteBatch is required to render meshes.
   at com.esotericsoftware.spine.SkeletonRenderer.draw(SkeletonRenderer.java:144)

Using PolygonSpriteBatch fixed it, but if i add FFD animation, i have this:

Exception in thread "LWJGL Application" java.lang.IndexOutOfBoundsException: index can't be >= size: 1 >= 1
   at com.badlogic.gdx.utils.Array.get(Array.java:127)
   at com.esotericsoftware.spine.SkeletonBinary.readAnimation(SkeletonBinary.java:395)
   at com.esotericsoftware.spine.SkeletonBinary.readSkeletonData(SkeletonBinary.java:162)

The goblins-ffd project exports and renders fine. Please make sure you are using the latest Spine and runtimes. If so, please post or email the JSON file that doesn't work.

Thanks for reply!
I don't know why, but i can't reproduce this problem anymore. I tried all, what i can, but problem is gone.
Solved )))