NPE in AnimControl.resetToBind

I wonder what can cause such error when loading an Ogre xml model with skeleton (but with no animations added):


at com.jme3.animation.AnimControl.resetToBind(

at com.jme3.animation.AnimControl.reset(

at com.jme3.animation.AnimControl.<init>(

at com.jme3.scene.plugins.ogre.MeshLoader.compileModel(

at com.jme3.scene.plugins.ogre.MeshLoader.load(

at com.jme3.asset.DesktopAssetManager.loadAsset(

at com.jme3.asset.DesktopAssetManager.loadModel(

at com.jme3.asset.DesktopAssetManager.loadModel([/java]

I have a tool that created for me some models in xml format and 3 of them load correctly and 1 does not, and this is not only in JMonkeyEngine but also in Ogre viewers. Checking files against DTD doesn’t reveal any errors in file structure so it must be something with data, but I don’t get a clue what? A bad reference between bones and vertices?

Apparently the bone index buffer is null, have you got a skeleton file with the mesh file?

If the model can’t be loaded by OgreViewer, there is very little chance it can be loaded by JME.

Maybe you should post on the ogre forum, or on a forum related to the tool that generated the xml, you are talking about.

Yes, I have the skeleton file. 3 other models created with my tool load properly. This, 4th one, loads only if I remove skeleton information from it (so the meshes themselves are correct).

I see there is one submesh with no bone assignments at all. Maybe this causes the bug?

maybe…it’s hard to figure out the issue just by reading a NPE stack trace :stuck_out_tongue:

Could you upload the file, maybe that can help.

Should be fixed now