Nifty-Editor crashes in 3.1 SDK

I’m happy editing my XML files as text, but I thought I ought to try out the Nifty-Editor plug-in. With an XML file open in the IDE, I click on the Visual button and immediately got an IllegalArgumentException. I got a similar result with several other Nifty XML files.

Running on jMonkeyEngine 3.1-stable

  • Branch: HEAD
  • Git Hash: af04bf9
  • Build Date: 2017-02-19
    LWJGL 2.9.3 context running on thread jME3 Main
  • Graphics Adapter: nvd3dumx,nvwgf2umx,nvwgf2umx
  • Driver Version: 21.21.13.7633
  • Scaling Factor: 1
    OpenGL Renderer Information
  • Vendor: NVIDIA Corporation
  • Renderer: GeForce GT 545/PCIe/SSE2
  • OpenGL Version: 4.5.0 NVIDIA 376.33
  • GLSL Version: 4.50 NVIDIA
  • Profile: Compatibility
    Audio Renderer Information
  • Device: OpenAL Soft
  • Vendor: OpenAL Community
  • Renderer: OpenAL Soft
  • Version: 1.1 ALSOFT 1.15.1
  • Supported channels: 64
  • ALC extensions: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_DEDICATED ALC_EXT_disconnect ALC_EXT_EFX ALC_EXT_thread_local_context ALC_SOFT_loopback
  • AL extensions: AL_EXT_ALAW AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXT_source_distance_model AL_LOKI_quadriphonic AL_SOFT_buffer_samples AL_SOFT_buffer_sub_data AL_SOFTX_deferred_updates AL_SOFT_direct_channels AL_SOFT_loop_points AL_SOFT_source_latency
    Pausing audio device not supported.
    Audio effect extension version: 1.0
    Audio max auxiliary sends: 4
    Returning hash code of content
    Reading welcome page content from web failed!
    wiki.jmonkeyengine.org
    Checking page id 0 vs stored id 0
    java.lang.IllegalArgumentException: No gui for your id
    at jada.ngeditor.model.GuiEditorModel.getGUI(GuiEditorModel.java:31)
    at jada.ngeditor.model.GuiEditorModel.setCurrentGUI(GuiEditorModel.java:72)
    at com.jme3.gde.gui.view.NiftyGuiVisualElement.componentActivated(NiftyGuiVisualElement.java:270)
    at org.netbeans.core.multiview.MultiViewPeer$SelectionListener.selectionActivatedByButton(MultiViewPeer.java:937)
    at org.netbeans.core.multiview.MultiViewModel.fireActivateCurrent(MultiViewModel.java:269)
    at org.netbeans.core.multiview.TabsComponent$ButtonMouseListener.mousePressed(TabsComponent.java:908)
    at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:280)
    at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279)
    at java.awt.Component.processMouseEvent(Component.java:6530)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
    at java.awt.Component.processEvent(Component.java:6298)
    at java.awt.Container.processEvent(Container.java:2236)
    at java.awt.Component.dispatchEventImpl(Component.java:4889)
    at java.awt.Container.dispatchEventImpl(Container.java:2294)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4522)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
    at java.awt.Container.dispatchEventImpl(Container.java:2280)
    at java.awt.Window.dispatchEventImpl(Window.java:2746)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.awt.EventQueue$4.run(EventQueue.java:729)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

The previous preview + XML text editor in the 3.0 SDK has been replaced with the nifty editor ( GitHub - relu91/niftyeditor: Create your game gui with nifty-editor and nifty-gui ), i.e. it uses its core with a bit of adapter code to embed it in the SDK. This was done quite a while ago in the hope that the creator of the nifty editor would improve it but few has been done on that front. Afaik it does work with the default nifty templates in the SDK though, maybe thats a way to find out what the issue is.

There has been the idea of rolling back to the 3.0 preview + xml editor because of this.

Where would I find default nifty templates in the SDK?

I tried editing the assets “/Interface/Nifty/HelloJme.xml” and “/Interface/Nifty/CinematicTest.xml” from jme3-testdata, and each produced a similar crash.

New File → GUI → etc.

1 Like

I created an empty GUI using the “New File” dialog, and when I clicked the Visual button I got the same IllegalArgumentException. And the same thing happened when I created a HelloJme GUI using the “New File” dialog.

Does anybody out there still use niftyeditor?

My guess is that no one but the original author ever used it. I think it was one of those “Google Summer of Code” projects. (Actually, we might have rejected that proposal but they implemented it anyway or something… even back then, nifty wasn’t highly used in the JME community… even less so now.)

So is it even worth filing an issue on this?

Considering it doesn’t take much to file an issue then it’s probably worth it. Worst case, no one works on it but at least you might find others who are also sad about it. Best case, someone does work on it.

1 Like

Done.

I still use Nifty ! For me the XML-Editor works fine, but for some reason I can’t view my GUI when I click on the “Visual” button. I do not get any exceptions like you but therefore it just shows a gray field with no content at all which isn’t really better.

When you still want to use Nifty try out the NiftyEditor if you haven’t already. It’s worth it!

2 Likes

Yesterday I tried out relu91’s standalone niftyeditor (v0.6-beta). It didn’t crash, but it reported being unable to handle “interact” elements. Most of my screens use interact elements (on button controls, mostly) so I concluded niftyeditor wouldn’t work for me.

Which version of the SDK are you using?

SDK 3.1 Stable

1 Like

Wondering if you guys are even talking about the same thing here.

1 Like

Working on this myself now and am experiencing these and many other problems myself.

@sgold what did you wind up doing about this?

My immediate solution was to stop trying to use the visual editor and go back to editing XML directly.

When SDK 3.2 was released, I re-tested the visual editor, and it didn’t immediately crash, so I closed my issue. However, I didn’t attempt any serious use of the SDK 3.2 visual editor, so it may still have serious bugs.

I see, I’m not using 3.2 yet.

Does anyone know if the Nifty editor is working without issue in 3.2?

I have been rewriting the Nifty wiki stuff as I learn it and have added warnings not to use it since it no longer is supported and has a significant amount of issues in 3.1-stable.

I think the online documentation should reflect the latest releases, 3.2.1 for the Engine and v3.2.1-stable-sdk3 for the SDK. What’s stopping you from upgrading your install?

I was saving it for my next step of learning which is networking. Didn’t think GUI would require anything new since it is so old and I haven’t seen any mention of updating anything Nifty or Lemur.

I spend months preparing and studying so I didn’t want to have to install yet another version of the engine if it updates before then. I spent since Jan 1 writing game code in preparation for GUI alone and just started the learning phase last week.

I don’t recall any changes to the nifty-editor since v3.1-alpha1 apart from the fact that we upgraded nifty itself to a newer version (but that was due to a problem that you couldn’t exit jme)