IndexOutOfBoundsException when loading 3ds file with jme 0.9

The problem has been solved - Thanks anyway  XD





I can successfully load 3ds files with jme v0.7.

Now I’m playing with loading 3ds files with jme v0.9 but I’m getting IndexOutOfBoundsException.

My source code is exactly same as HelloModelLoading except the first two lines.



I’ve changed only URL of my model and a function: ObjToJme() to MaxToJme().

Here is my code


URL model=HelloModelLoading.class.getClassLoader().getResource("3ds/MyModel.3ds");
        FormatConverter converter=new MaxToJme();
        converter.setProperty("mtllib",model);

        ByteArrayOutputStream BO=new ByteArrayOutputStream();
        JmeBinaryReader jbr=new JmeBinaryReader();
        BinaryToXML btx=new BinaryToXML();
        try {
            converter.convert(model.openStream(), BO);
            btx.sendBinarytoXML(new ByteArrayInputStream(BO.toByteArray()),new OutputStreamWriter(System.out));

            jbr.setProperty("bound","box");
           
            Node maggie=jbr.loadBinaryFormat(new ByteArrayInputStream(BO.toByteArray()));
            maggie.setLocalScale(.1f);
            rootNode.attachChild(maggie);
        } catch (IOException e) {   // Just in case anything happens
            System.out.println("Damn exceptions!" + e);
            e.printStackTrace();
            System.exit(0);
        }



and this is the error

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
   at java.util.ArrayList.RangeCheck(Unknown Source)
   at java.util.ArrayList.get(Unknown Source)
   at com.jme.animation.SpatialTransformer.setBeginAndEnd(SpatialTransformer.java:170)
   at com.jme.animation.SpatialTransformer.update(SpatialTransformer.java:126)
   at com.jme.scene.Spatial.updateWorldData(Spatial.java:490)
   at com.jme.scene.Node.updateWorldData(Node.java:299)
   at com.jme.scene.Spatial.updateGeometricState(Spatial.java:464)
   at com.jme.scene.Node.updateWorldData(Node.java:304)
   at com.jme.scene.Spatial.updateGeometricState(Spatial.java:464)
   at com.jme.scene.Node.updateWorldData(Node.java:304)
   at com.jme.scene.Spatial.updateGeometricState(Spatial.java:464)
   at com.jme.app.SimpleGame.initGame(SimpleGame.java:377)
   at com.jme.app.BaseGame.start(BaseGame.java:65)
   at TDSLoader.main(TDSLoader.java:33)



I noticed that if I change "Required projects on the build path" (in my eclipse) from jme v0.9 to v0.7, it's just work!!
Is it a problem with jme v0.9?
any advise would be much appreciated

I'm not sure how I can fixed it…  :-o, really don't know…



If I know why I'll come back to post again.