ssebi / jmonkeyengine

Automatically exported from code.google.com/p/jmonkeyengine
0 stars 0 forks source link

NullPointerException when using a material definition without world parameters #454

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm using JME 3.0.0 Beta

To reprocduce, just take a random j3md file and remove the world parameters 
(both an empty block and no block at all have the same result), then try create 
a material, applies it to a mesh and run.

Here's the exception :
java.lang.NullPointerException
    at com.jme3.material.Technique.loadShader(Technique.java:240)
    at com.jme3.material.Technique.makeCurrent(Technique.java:214)
    at com.jme3.material.Material.selectTechnique(Material.java:885)
    at com.jme3.material.Material.autoSelectTechnique(Material.java:899)
    at com.jme3.material.Material.render(Material.java:969)
    at com.jme3.renderer.RenderManager.renderGeometry(RenderManager.java:657)
    at com.jme3.renderer.queue.RenderQueue.renderGeometryList(RenderQueue.java:301)
    at com.jme3.renderer.queue.RenderQueue.renderQueue(RenderQueue.java:357)
    at com.jme3.renderer.RenderManager.renderViewPortQueues(RenderManager.java:894)
    at com.jme3.renderer.RenderManager.flushQueue(RenderManager.java:850)
    at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:1126)
    at com.jme3.renderer.RenderManager.render(RenderManager.java:1168)
    at com.jme3.app.SimpleApplication.update(SimpleApplication.java:266)
    at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:149)
    at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:185)
    at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:223)
    at java.lang.Thread.run(Thread.java:679)

The fact is, the worldBinds List (in the TechniqueDef class) is created when 
the first is added. But nullity isn't checked in Technique.LoadShader

Original issue reported on code.google.com by amand.be...@gmail.com on 14 Jan 2012 at 12:50

GoogleCodeExporter commented 9 years ago

Original comment by normen667 on 2 Feb 2012 at 4:57

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r9129.

Original comment by ShadowIs...@gmail.com on 2 Feb 2012 at 6:08