I think this is a repeat of the problems with JmeBinaryReader before, where a change in CVS leads to the buffers created in JmeBinaryReader imported meshes being invalid. When creating clod:
java.lang.IndexOutOfBoundsException: 644
at java.nio.DirectFloatBufferU.get(DirectFloatBufferU.java:209)
at com.jme.scene.lod.ClodCreator.reorder(ClodCreator.java:522)
at com.jme.scene.lod.ClodCreator.<init>(ClodCreator.java:208)
at com.jme.scene.lod.ClodMesh.create(ClodMesh.java:146)
at com.jme.scene.lod.ClodMesh.<init>(ClodMesh.java:127)
at com.jme.scene.lod.ClodMesh.<init>(ClodMesh.java:101)
at com.jme.scene.lod.AreaClodMesh.<init>(AreaClodMesh.java:98)
…
If I skip the clod, I get this:
java.lang.IllegalArgumentException
at java.nio.Buffer.limit(Buffer.java:249)
at com.jme.renderer.lwjgl.LWJGLRenderer.predrawGeometry(LWJGLRenderer.java:1320)
at com.jme.renderer.lwjgl.LWJGLRenderer.draw(LWJGLRenderer.java:941)
at com.jme.scene.batch.TriangleBatch.draw(TriangleBatch.java:249)
at com.jme.scene.TriMesh.draw(TriMesh.java:268)
at com.jme.scene.Spatial.onDraw(Spatial.java:214)
The code with the problem is one I had trouble with last time:
if (colors != null) {
// make sure only the necessary colors are sent through on old cards.
oldLimit = colors.limit();
colors.limit(t.getVertexCount() * 3);
}
Commenting the colors.limit line gives me a few seconds running, with some meshes messed up, others looking fine, then a JVM crash.
So... I'll dig through the binary reader code again, I suspect it's just another buffer thing. Presumably with binary reader being deprecated, no models read using it are checked before CVS changes?