I often got two exception

I often got two exception below when I ran my app that based on jME3 these days , I did nothing when I got them, just restart my app,and exceptions disappeared.I thought maybe it's my app's bug,but the Exception Infomation did't tell me which line of my code (not jME3) caused it ,Or other reason?

thanks very much!





2010-8-19 20:20:38 com.jme3.app.Application handleError

严重: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]

java.lang.ArrayIndexOutOfBoundsException: 16

        at com.jme3.renderer.IDList.moveToNew(IDList.java:26)

        at com.jme3.renderer.lwjgl.LwjglRenderer.setTexture(LwjglRenderer.java:1414)

        at com.jme3.material.Material.render(Material.java:512)

        at com.jme3.renderer.RenderManager.renderGeometry(RenderManager.java:302)

        at com.jme3.renderer.queue.RenderQueue.renderGeometryList(RenderQueue.java:100)

        at com.jme3.renderer.queue.RenderQueue.renderQueue(RenderQueue.java:147)

        at com.jme3.renderer.queue.RenderQueue.renderQueue(RenderQueue.java:138)

        at com.jme3.renderer.RenderManager.flushQueue(RenderManager.java:414)

        at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:550)

        at com.jme3.renderer.RenderManager.render(RenderManager.java:564)

        at com.jme3.app.SimpleBulletApplication.update(SimpleBulletApplication.java:302)

        at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:112)

        at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:162)

        at java.lang.Thread.run(Thread.java:619)

2010-8-19 20:20:39 com.jme3.scene.plugins.ogre.MeshLoader startElement



严重: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]

java.lang.NullPointerException

        at com.bulletphysics.collision.broadphase.DbvtBroadphase.setAabb(DbvtBroadphase.java:203)

        at com.bulletphysics.collision.dispatch.CollisionWorld.updateSingleAabb(CollisionWorld.java:222)

        at com.bulletphysics.collision.dispatch.CollisionWorld.updateAabbs(CollisionWorld.java:247)

        at com.bulletphysics.collision.dispatch.CollisionWorld.performDiscreteCollisionDetection(CollisionWorld.java:135)

        at com.bulletphysics.dynamics.DiscreteDynamicsWorld.internalSingleStepSimulation(DiscreteDynamicsWorld.java:372)

        at com.bulletphysics.dynamics.DiscreteDynamicsWorld.stepSimulation(DiscreteDynamicsWorld.java:337)

        at com.jme3.bullet.PhysicsSpace.update(PhysicsSpace.java:359)

        at com.jme3.bullet.PhysicsSpace.update(PhysicsSpace.java:303)

        at com.jme3.app.SimpleBulletApplication.update(SimpleBulletApplication.java:301)

        at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:112)

        at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:162)

        at java.lang.Thread.run(Thread.java:619)

To the second one, do you have a meshshape colliding with a gimpactshape?

or a null collision shape(No triangles in meshshape?)



The first one might be related to a missing texture?

For the "java.lang.ArrayIndexOutOfBoundsException: 16" issue, is there a particular model that causes this exception or does it happen randomly?

yes , it happen randomly.

by the way , my code used Multi-thread when import model(but no special handling : lock , wait…),the thread contains all of my models' import process .so my models are loading into scene at any time. could it be this reason?

as far as I know only the attaching has to be done in the opengl thread, at least I load them in background too, nd it works fine.

… Yeah this issue can be caused by threading, I noticed it happen but I am not sure why.

Do what Empire Phoenix said and attach models in the GL thread.

On few occasions I get the same error (DbvtBroadphase)

It happens when the physic parts are created, therefore I think it’s a collision problem.

Whats a gimpactshape? I googled it, but can’t see the difference between a meshshape



Thx

Gimpact shapes can move, mesh shapes cannot.