Hi again,
I have began implementing the events in my app, using libgdx runtime, but have a problem.
I create an event, set at a certain keyframe and then I export it to my project.
When my character with this animation runs, an exception is throw at the frame which the event is set:
Exception in thread "LWJGL Application" java.lang.ArrayIndexOutOfBoundsException: -2147483648
at com.esotericsoftware.spine.Animation.binarySearch(Animation.java:117)
at com.esotericsoftware.spine.Animation$EventTimeline.apply(Animation.java:541)
at com.esotericsoftware.spine.Animation.apply(Animation.java:75)
at com.esotericsoftware.spine.AnimationState.apply(AnimationState.java:87)
Doing some debugging, this happens like explained on the commented code, at binarySearch method:
int high = values.length / step - 2; //values.length is 1 (the only value of the array is 0.33334), step is 1 too, this resulting value is -1
if (high == 0) return step; // skip
int current = high >>> 1; // high = -1, so the resulting value of current is: -2147483647
while (true) {
if (values[(current + 1) * step] <= target) //Exception here
As a note, this doesn't happen if I remove the keyed event. If I key it again, the exception happens at the frame of the event.
I'm sure I'm not doing something different to the test included in source code. I just update the skeleton and then apply an animation.
I attached my project file, maybe it gives some insight why is this happening ( skin: dispnormal, animation: animdisprotardisparo).
Thanks in advance.
PD: I'm using the AnimationState Class to set / apply animations, and updated libgdx and spine runtime to the latest version.