The following code produces the message at the bottom. What's wrong?
chunk2 = Loader.loadSerializedObject(new FileInputStream("chunk2.ser"));
Object3D chunk2Trees = Loader.loadSerializedObject(new FileInputStream("chunk2trees.ser"));
chunk2Trees.setTransparency(100);
chunk2Blades = Loader.loadSerializedObjectArray(new FileInputStream("chunk2blades.ser"));
for (int i = 0; i < chunk2Blades.length; i++) {
chunk2.addChild(chunk2Blades[i]);
chunk2Blades[i].build();
theWorld.addObject(chunk2Blades[i]);
}
chunk2Trees.build();
chunk2.build();
chunk2.addChild(chunk2Trees);
chunk2.setRotationPivot(SimpleVector.ORIGIN);
chunk2.rotateX((float)Math.PI*-.5f);//-.5f
chunk2.translate(superman.getZ().x*-59700f, 0, superman.getZ().z*-59700f);
theWorld.addObject(chunk2Trees);
theWorld.addObject(chunk2);
chunk3 = Loader.loadSerializedObject(new FileInputStream("chunk3.ser"));
chunk3.build();
chunk3.setRotationPivot(SimpleVector.ORIGIN);
chunk3.rotateX((float)Math.PI*-.5f);//-.5f
chunk3.translate(superman.getZ().x*-119400f, 0, superman.getZ().z*-119400f);
theWorld.addObject(chunk3);
java.lang.ArrayIndexOutOfBoundsException: 69518
at com.threed.jpct.Object3D.recreateTextureCoords(Object3D.java:4840)
at com.threed.jpct.Object3D.build(Object3D.java:1830)
at SuperEndless.loadModelsSerialized(SuperEndless.java:181)
at SuperEndless.<init>(SuperEndless.java:122)
at SuperEndless.main(SuperEndless.java:391)
[ Thu Oct 24 12:45:21 BRST 2013 ] - ERROR: Couldn't build() object (object542):
java.lang.ArrayIndexOutOfBoundsException/69518
No octree found in serialized data!
java.lang.ArrayIndexOutOfBoundsException: 70061
at com.threed.jpct.Object3D.recreateTextureCoords(Object3D.java:4840)
at com.threed.jpct.Object3D.build(Object3D.java:1830)
at SuperEndless.loadModelsSerialized(SuperEndless.java:189)
at SuperEndless.<init>(SuperEndless.java:122)
at SuperEndless.main(SuperEndless.java:391)
[ Thu Oct 24 12:45:21 BRST 2013 ] - ERROR: Couldn't build() object (object1707):
java.lang.ArrayIndexOutOfBoundsException/70061