Cuellarjmcg

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.
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
Cuellarjmcg

Kickstarter Backer
  • Beiträge: 92

Nate

Hmm. I'll take a look first thing in the morning, gotta sleep now! :sleepy:
Benutzeravatar
Nate

Nate
  • Beiträge: 9161

Cuellarjmcg

Nate hat geschrieben:Hmm. I'll take a look first thing in the morning, gotta sleep now! :sleepy:
Ok no problem, a good rest is always needed :p and thanks.
Cuellarjmcg

Kickstarter Backer
  • Beiträge: 92

DKoding

I have the same problem... now 2.5 years later... Was this ever resolved?
DKoding
  • Beiträge: 6

Falamire

I have the same problem... now 6 years later... Was this ever resolved?
Falamire
  • Beiträge: 2

Nate

Sorry this thread had not gotten replies, but there isn't a problem with events in spine-libgdx. Spine is built on top of spine-libgdx, as is the Skeleton Viewer. The OP's project attached above works fine in the Skeleton Viewer (sonido in the corner shows the sonido event fires just fine, no crashes):


If you do have a problem, please post how we can see it happen. You may want to start a new thread unless your problem is really the same as the error in this thread above.
Benutzeravatar
Nate

Nate
  • Beiträge: 9161


Zurück zu Bugs