Lemur IndexOutOfBoundsException

Hello Everyone,

Started getting this exception recently. Any thoughts? I think its related to batching my buildings together but I’m not sure. Any help troubleshooting would be appreciated.

06:41:03,533 ERROR [LegacyApplication] Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.IndexOutOfBoundsException
	at java.nio.Buffer.checkBounds(Buffer.java:567) ~[?:1.8.0_111]
	at java.nio.DirectFloatBufferU.get(DirectFloatBufferU.java:265) ~[?:1.8.0_111]
	at com.jme3.scene.BatchNode.doTransforms(BatchNode.java:545) ~[jme3-core-3.2.0-SNAPSHOT.jar:3.2-6159]
	at com.jme3.scene.BatchNode.updateSubBatch(BatchNode.java:155) ~[jme3-core-3.2.0-SNAPSHOT.jar:3.2-6159]
	at com.jme3.scene.BatchNode.onTransformChange(BatchNode.java:104) ~[jme3-core-3.2.0-SNAPSHOT.jar:3.2-6159]
	at com.jme3.scene.Geometry.updateWorldTransforms(Geometry.java:315) ~[jme3-core-3.2.0-SNAPSHOT.jar:3.2-6159]
	at com.jme3.scene.Spatial.checkDoTransformUpdate(Spatial.java:700) ~[jme3-core-3.2.0-SNAPSHOT.jar:3.2-6159]
	at com.jme3.scene.Spatial.checkDoBoundUpdate(Spatial.java:714) ~[jme3-core-3.2.0-SNAPSHOT.jar:3.2-6159]
	at com.jme3.scene.Geometry.collideWith(Geometry.java:447) ~[jme3-core-3.2.0-SNAPSHOT.jar:3.2-6159]
	at com.jme3.scene.Node.collideWith(Node.java:611) ~[jme3-core-3.2.0-SNAPSHOT.jar:3.2-6159]
	at com.jme3.scene.Node.collideWith(Node.java:611) ~[jme3-core-3.2.0-SNAPSHOT.jar:3.2-6159]
	at com.jme3.scene.Node.collideWith(Node.java:611) ~[jme3-core-3.2.0-SNAPSHOT.jar:3.2-6159]
	at com.jme3.scene.BatchNode.collideWith(BatchNode.java:750) ~[jme3-core-3.2.0-SNAPSHOT.jar:3.2-6159]
	at com.jme3.scene.Node.collideWith(Node.java:611) ~[jme3-core-3.2.0-SNAPSHOT.jar:3.2-6159]
	at com.jme3.scene.Node.collideWith(Node.java:611) ~[jme3-core-3.2.0-SNAPSHOT.jar:3.2-6159]
	at com.jme3.scene.Node.collideWith(Node.java:611) ~[jme3-core-3.2.0-SNAPSHOT.jar:3.2-6159]
	at com.simsilica.lemur.event.PickEventSession.cursorMoved(PickEventSession.java:467) ~[lemur-1.9.1-SNAPSHOT.jar:?]
	at com.simsilica.lemur.event.MouseAppState.dispatchMotion(MouseAppState.java:93) ~[lemur-1.9.1-SNAPSHOT.jar:?]
	at com.simsilica.lemur.event.BasePickState.update(BasePickState.java:169) ~[lemur-1.9.1-SNAPSHOT.jar:?]
	at com.jme3.app.state.AppStateManager.update(AppStateManager.java:287) ~[jme3-core-3.2.0-SNAPSHOT.jar:3.2-6159]
	at com.jme3.app.SimpleApplication.update(SimpleApplication.java:236) ~[jme3-core-3.2.0-SNAPSHOT.jar:3.2-6159]
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:151) ~[jme3-lwjgl-3.2.0-SNAPSHOT.jar:3.2-6159]
	at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:197) ~[jme3-lwjgl-3.2.0-SNAPSHOT.jar:3.2-6159]
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:232) ~[jme3-lwjgl-3.2.0-SNAPSHOT.jar:3.2-6159]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111] 

I don’t think this is a Lemur issue.

It looks like you’d actually get the same problem updating the world transforms of your batch. Possibly one of the children has a bad mesh or something. Looks like it’s trying to update the child position buffers to the latest transforms but failing because one of the meshes doesn’t have the right number of elements in its position buffer.