I ran jme3test.awt.TestCanvas and nifty crashes at :
“switch look and feel”.
“set size to 0”.
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
java.lang.NullPointerException
at de.lessvoid.nifty.Nifty.displayResolutionChanged(Nifty.java:685)
at de.lessvoid.nifty.Nifty.render(Nifty.java:270)
at com.jme3.niftygui.NiftyJmeDisplay.postQueue(NiftyJmeDisplay.java:170)
at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:1121)
at com.jme3.renderer.RenderManager.render(RenderManager.java:1173)
at com.jme3.app.SimpleApplication.update(SimpleApplication.java:263)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:149)
at com.jme3.system.lwjgl.LwjglCanvas.runLoop(LwjglCanvas.java:228)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:223)
at java.lang.Thread.run(Thread.java:662)
Also i noticed something strange, after using start/stop application, my init was called again, ambient light was recreated thus scene got brighter every time i used it.
Sounds like a bug in nifty. @void256: know anything about this?
About the start/stop issue, it assumes you’re not caching the scene since the entire application is restarted. If you store the scene somewhere then of course it will get corrupted each time the init is called
no, void256 knows nothing about that but when I suppose tralala uses Nifty 1.3 then the lines where it crashes is accessing the currentScreen instance variable of the Nifty instance. So could it be that this resolutionChanged() event is happening without having a valid screen yet?
jme3test.awt.TestCanvas in jMonkeyPlattform crashes here as well but I really don’t see any reference to Nifty in this example at all o_O