Bones - Skeletal and Pose Animations for jPCT/jPCT-AE > Bones

ArrayIndexOutOfBoundsException when cloning Object3D from AnimatedGroup

(1/2) > >>

FATAL EXCEPTION in thread: GLThread 248
java.lang.ArrayIndexOutOfBoundsException: length=1640; index=1640
    at com.threed.jpct.Mesh.compress(
    at com.threed.jpct.Mesh.cloneMesh(
    at com.threed.jpct.Object3D.copy(
    at com.threed.jpct.Object3D.<init>(
    at raft.jpct.bones.Animated3D.<init>(
    at raft.jpct.bones.AnimatedGroup.clone(

I've seen this exception for a couple of models now when attempting to clone an AnimatedGroup loaded via Bones with reuseMesh = false.  (The model was converted from Blender to Ogre to .bones using    Not a problem in general but has occurred with specific models from completely different sources.  Any ideas?  I can send the .bones file if needed.  Thanks!

I'm not sure... Could it be that Bones creates a clone target object that's too small for some reason?

Would it be possible to test by trying with this bones file?  It loads and works fine, animates properly, etc.  Cloning while re-using mesh works fine (as long as this is done prior to any animation).  It is only when attempting to clone (using animatedGroup.clone(false) (not reusing mesh), that the JPCT-AE exception occurs.  Exception at same location also occurs with another completely different model.

I am interested in cloning with reuseMesh false so that I can keep one cached in memory (not attached to a World) and then quickly add multiple copies to a world and have them be able to animate independently.   If I clone with reusing mesh then subsequent clones are disfigured after animating (probably expected) - however please let me know if there's another way to do this (resetting animation prior to clone doesn't seem to help).


Looks more like a jPCT related issue than an actual Bones problem then. I'll look into it...

Please try this jar:


[0] Message Index

[#] Next page

Go to full version