Crashes when using J3m files

well, i have the following problem: I have a geometry taht when  using the material file works all right, however when i try to use a j3m file (only diffuse map) it crashes with this exeption



Material Pong terrain01 :  Common/MatDefs/Light/Lighting.j3md {
    MaterialParameters {
   m_Shininess: 16.0
   m_DiffuseMap: surface/terrain01.mesh.xml0.dds
    }
}




java.lang.NullPointerException
   at com.jme3.renderer.queue.OpaqueComparator.compare(OpaqueComparator.java:59)
   at com.jme3.renderer.queue.OpaqueComparator.compare(OpaqueComparator.java:1)
   at java.util.Arrays.mergeSort(Unknown Source)
   at java.util.Arrays.mergeSort(Unknown Source)
   at java.util.Arrays.mergeSort(Unknown Source)
   at java.util.Arrays.mergeSort(Unknown Source)
   at java.util.Arrays.sort(Unknown Source)
   at com.jme3.renderer.queue.GeometryList.sort(GeometryList.java:72)
   at com.jme3.renderer.queue.RenderQueue.renderGeometryList(RenderQueue.java:93)
   at com.jme3.renderer.queue.RenderQueue.renderQueue(RenderQueue.java:142)
   at com.jme3.renderer.RenderManager.flushQueue(RenderManager.java:332)
   at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:460)
   at com.jme3.renderer.RenderManager.render(RenderManager.java:474)
   at com.jme3.app.SimpleApplication.update(SimpleApplication.java:165)
   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(Unknown Source)



This error hapens when i load it single or multithreaded. Some of my geometrys use a j3m file (well exactly this one only) the others are using the .material file.

Anyone knows what might be causing this?

Check the console, I'm very sure, that it tell you somewhere, that the .j3m file couldn't be located. This means, that at least one Geometry have no Material (Material set to NULL), so when the Comparator tries to access a method of the Material it will throw a NullPointerException (because there is no material).



Plz double check the resource name, hope it helped.

No, if I just remove the j3m file it simply uses a red default material

ok, forget this, i actually loaded the file but forgot to set it properly ^^ -> Everything is working as it should