Nifty exceptions in design panel

I just updated to the latest version of jme trunk from RC2 and I am running into several errors with Nifty in the design/preview panel in the SDK. Nothing ends up being rendered there, however it mostly works when running the game (some of my styles need to be updated).

This is the first error:
java.lang.NullPointerException
at com.jme3.gde.gui.multiview.NiftyPreviewPanel$7.call(NiftyPreviewPanel.java:306)
at com.jme3.app.AppTask.invoke(AppTask.java:142)
at com.jme3.app.Application.runQueuedTasks(Application.java:583)
at com.jme3.app.Application.update(Application.java:596)
at com.jme3.gde.core.scene.SceneApplication.update(SceneApplication.java:302)
at com.jme3.system.awt.AwtPanelsContext.updateInThread(AwtPanelsContext.java:188)
at com.jme3.system.awt.AwtPanelsContext.access$100(AwtPanelsContext.java:44)
at com.jme3.system.awt.AwtPanelsContext$AwtPanelsListener.update(AwtPanelsContext.java:68)
at com.jme3.system.lwjgl.LwjglOffscreenBuffer.runLoop(LwjglOffscreenBuffer.java:125)
at com.jme3.system.lwjgl.LwjglOffscreenBuffer.run(LwjglOffscreenBuffer.java:151)
at java.lang.Thread.run(Thread.java:722)

Second one:
java.lang.IllegalArgumentException: Processor cannot be null.
at com.jme3.renderer.ViewPort.removeProcessor(ViewPort.java:147)
at com.jme3.gde.gui.multiview.NiftyPreviewPanel$8.call(NiftyPreviewPanel.java:318)
at com.jme3.app.AppTask.invoke(AppTask.java:142)
at com.jme3.app.Application.runQueuedTasks(Application.java:583)
at com.jme3.app.Application.update(Application.java:596)
at com.jme3.gde.core.scene.SceneApplication.update(SceneApplication.java:302)
at com.jme3.system.awt.AwtPanelsContext.updateInThread(AwtPanelsContext.java:188)
at com.jme3.system.awt.AwtPanelsContext.access$100(AwtPanelsContext.java:44)
at com.jme3.system.awt.AwtPanelsContext$AwtPanelsListener.update(AwtPanelsContext.java:68)
at com.jme3.system.lwjgl.LwjglOffscreenBuffer.runLoop(LwjglOffscreenBuffer.java:125)
at com.jme3.system.lwjgl.LwjglOffscreenBuffer.run(LwjglOffscreenBuffer.java:151)
at java.lang.Thread.run(Thread.java:722)

And then this one:
java.lang.NoClassDefFoundError: de/lessvoid/nifty/batch/spi/BatchRenderBackend
at com.jme3.gde.gui.multiview.NiftyPreviewPanel$6.call(NiftyPreviewPanel.java:281)
at com.jme3.app.AppTask.invoke(AppTask.java:142)
at com.jme3.app.Application.runQueuedTasks(Application.java:583)
at com.jme3.app.Application.update(Application.java:596)
at com.jme3.gde.core.scene.SceneApplication.update(SceneApplication.java:302)
at com.jme3.system.awt.AwtPanelsContext.updateInThread(AwtPanelsContext.java:188)
at com.jme3.system.awt.AwtPanelsContext.access$100(AwtPanelsContext.java:44)
at com.jme3.system.awt.AwtPanelsContext$AwtPanelsListener.update(AwtPanelsContext.java:68)
at com.jme3.system.lwjgl.LwjglOffscreenBuffer.runLoop(LwjglOffscreenBuffer.java:125)
at com.jme3.system.lwjgl.LwjglOffscreenBuffer.run(LwjglOffscreenBuffer.java:151)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ClassNotFoundException: de.lessvoid.nifty.batch.spi.BatchRenderBackend starting from ModuleCL@71798075[com.jme3.gde.core.baselibs] with possible defining loaders [ModuleCL@354a6983[com.jme3.gde.core.libraries]] and declared parents [ModuleCL@354a6983[com.jme3.gde.core.libraries]]
at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:264)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
… 11 more
Caused by: java.lang.ClassNotFoundException: de.lessvoid.nifty.batch.spi.BatchRenderBackend
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:262)
… 12 more

My guess is the viewer didn’t get updated after latest Nifty release/bug fix/whatever…

Has a fix for this been released yet? I’m having the same problems with the design panel…

I only get this issue with any version above the stable version, so like said above, it must be something with Nifty’s design panel not being updated along with Jme3.

As far as I can see, the newest builds use the BatchRenderBackend, which for some inexplicable reason is not incorporated in the latest maven nifty-release (1.3.2). In fact, the whole batch folder is missing from the library. The current 1.3 and 1.4 branch of the project do have the folder, though.

That’s odd. I just took a look and I can see the class files in nifty’s jar file in the ext section of the modules folder. It’s strange that a classNotFound exception is occurring even though the class is indeed there.

EDIT: Nevermind, I searched through Nifty’s website and found that the entire batch folder is not included with Nifty 1.3.2, and will come in Nifty 1.3.3 because it was introduced after Nifty 1.3.2. Thanks for the help though. :slight_smile:

I can confirm the design panel is broke

I’m looking into this issue, some packages were added to nifty 1.3 and they have to be added in the SDk-Library project.
This fixed the classNotFound exception, however it seems that lot of things changed in nifty since the editor was implemented and it’s not working properly.
I just have a blank preview whatever I do.
I’ll keep you updated

1 Like

Yeah, had the same problem, @nehon. I changed my VideoRenderer from OPENGL3 to OPENGL_ANY (I’m using a custom made child from your Application-class and lwjgl) and tada, nifty gui elements showed up again.

OT: Also, your latest jme3 build doesn’t want to start up on my machine when using a SimpleApp because of some OpenAL IllegalArgumentException. Luckily, I was stubborn enough to create my own CustomApp. ^^

P.S.: Just an FYI: With OPENGL3 the console output mentioned something like OpenGL 1.5, while with OPENGL_ANY it mentions 4.3.0

P.P.S.: I know you’re using the sdk editor and I’m just using your libraries (and the 1.3.3 nifty one’s from their git-hub) in eclipse, but I think the problem is still the same?

Just ran into this error myself, and first time trying to make a GUI too! ;(

Can anyone explain steps to fix it? As I’ve never dealt with nifty before and not sure where to look.

Thanks.

Honestly I didn’t find the panel very helpful, I just work with nifty directly from XML and builders.

The design panel thing is a good idea but was too limited to be useful, for example if you imported any styles or similar from another file it immediately broke.

Pretty much what I’m having to do now, but a simple wysiwyg designer would be nice for beginners to start with, you know design something simple and see the output XML and then learn from there, after getting the basics of how it works then go manual for complicated things.
Just Thought since jME’s going stable release the stuff in the SDK should work or be removed if it doesn’t. but then I’m an idealist.

Cheers

2 Likes
@zarch said: Honestly I didn't find the panel very helpful, I just work with nifty directly from XML and builders.

The design panel thing is a good idea but was too limited to be useful, for example if you imported any styles or similar from another file it immediately broke.

This isn’t true since years anymore. It loads any data from the project.

Ahh, ok. Well it didn’t when I tried to use it which was over a year ago. Guess it got upgraded since :slight_smile: