away3d/away3d-core-fp11 — Issue #149: Error playing skeletal animations.
Author: makaimedia
Created: 2011-10-11 16:01:35+00:00
State: open

When I load an md5 file, with 3 animations, I get this error intermittently.

[Fault] exception, information=RangeError: Error #1125: The index 40 is out of range 40.

It does not happen every time, and restarting the application make the issue go away.

The error is here:
override public function updatePose(skeleton : Skeleton) : void
{
if (_clip.duration == 0) return;
if (_framesInvalid) updateFrames(_time-_startTime);

var poses1 : Vector. = clip._frames[_frame1].jointPoses;
var poses2 : Vector. = clip._frames[_frame2].jointPoses;

clip._frames has 39 elements, but _frame2 is looking for 40.

_frame 2 has an incorrect count of the length of clip._frames.