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

ArrayIndexOutOfBoundsException when cloning Object3D from AnimatedGroup

(1/2) > >>

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

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 jmeOgre2Bones.sh.)    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!

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

dcfingerprint:
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). 

https://www.dropbox.com/s/qzzdyhiiencye26/granny-bones.zip?dl=0

Thanks!

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

EgonOlsen:
Please try this jar: http://jpct.de/download/beta/jpct_ae.jar

Navigation

[0] Message Index

[#] Next page

Go to full version