Nifty exception

Hey. Caught this exception. Unknown reason, and it’s too deep in nifty for me to follow it.

What has happened before this, is i’ve changed/started/stopped screens. Initiated by a mouse click. To be more specific, i’ve started a mission in Hostile Sector.



2012-sep-06 20:44:12 de.lessvoid.nifty.NiftyMethodInvoker callMethod

WARNING: RuntimeException: java.lang.IllegalArgumentException: argument type mismatch

2012-sep-06 20:44:12 de.lessvoid.nifty.NiftyMethodInvoker logException

WARNING: sun.reflect.NativeMethodAccessorImpl invoke0 (null:-2)

2012-sep-06 20:44:12 de.lessvoid.nifty.NiftyMethodInvoker logException

WARNING: sun.reflect.NativeMethodAccessorImpl invoke (null:-1)

2012-sep-06 20:44:12 de.lessvoid.nifty.NiftyMethodInvoker logException

WARNING: sun.reflect.DelegatingMethodAccessorImpl invoke (null:-1)

2012-sep-06 20:44:12 de.lessvoid.nifty.NiftyMethodInvoker logException

WARNING: java.lang.reflect.Method invoke (null:-1)

2012-sep-06 20:44:12 de.lessvoid.nifty.NiftyMethodInvoker logException

WARNING: de.lessvoid.nifty.NiftyMethodInvoker callMethod (NiftyMethodInvoker.java:145)

2012-sep-06 20:44:12 de.lessvoid.nifty.NiftyMethodInvoker logException

WARNING: de.lessvoid.nifty.NiftyMethodInvoker performInvoke (NiftyMethodInvoker.java:101)

2012-sep-06 20:44:12 de.lessvoid.nifty.NiftyMethodInvoker logException

WARNING: de.lessvoid.nifty.Nifty$DelayedMethodInvoke perform (Nifty.java:1137)

2012-sep-06 20:44:12 de.lessvoid.nifty.NiftyMethodInvoker logException

WARNING: de.lessvoid.nifty.Nifty invokeMethods (Nifty.java:1115)

2012-sep-06 20:44:12 de.lessvoid.nifty.NiftyMethodInvoker logException

WARNING: de.lessvoid.nifty.Nifty handleDynamicElements (Nifty.java:342)

2012-sep-06 20:44:12 de.lessvoid.nifty.NiftyMethodInvoker logException

WARNING: de.lessvoid.nifty.Nifty access$1500 (Nifty.java:76)

2012-sep-06 20:44:12 de.lessvoid.nifty.NiftyMethodInvoker logException

WARNING: de.lessvoid.nifty.Nifty$NiftyInputConsumerImpl processEvent (Nifty.java:1332)

2012-sep-06 20:44:12 de.lessvoid.nifty.NiftyMethodInvoker logException

WARNING: de.lessvoid.nifty.Nifty$NiftyInputConsumerImpl processMouseEvent (Nifty.java:1290)

2012-sep-06 20:44:12 de.lessvoid.nifty.NiftyMethodInvoker logException

WARNING: com.jme3.niftygui.InputSystemJme onMouseButtonEventQueued (InputSystemJme.java:163)

2012-sep-06 20:44:12 de.lessvoid.nifty.NiftyMethodInvoker logException

WARNING: com.jme3.niftygui.InputSystemJme forwardEvents (InputSystemJme.java:237)

2012-sep-06 20:44:12 de.lessvoid.nifty.NiftyMethodInvoker logException

WARNING: de.lessvoid.nifty.Nifty update (Nifty.java:276)

2012-sep-06 20:44:12 de.lessvoid.nifty.NiftyMethodInvoker logException

WARNING: com.jme3.niftygui.InputSystemJme endInput (InputSystemJme.java:93)

2012-sep-06 20:44:12 de.lessvoid.nifty.NiftyMethodInvoker logException

WARNING: com.jme3.input.InputManager processQueue (InputManager.java:792)

2012-sep-06 20:44:12 de.lessvoid.nifty.NiftyMethodInvoker logException

WARNING: com.jme3.input.InputManager update (InputManager.java:856)

2012-sep-06 20:44:12 de.lessvoid.nifty.NiftyMethodInvoker logException

WARNING: com.jme3.app.Application update (Application.java:606)

2012-sep-06 20:44:12 de.lessvoid.nifty.NiftyMethodInvoker logException

WARNING: com.jme3.app.SimpleApplication update (SimpleApplication.java:230)

2012-sep-06 20:44:12 de.lessvoid.nifty.NiftyMethodInvoker logException

WARNING: com.jme3.system.lwjgl.LwjglAbstractDisplay runLoop (LwjglAbstractDisplay.java:151)

2012-sep-06 20:44:12 de.lessvoid.nifty.NiftyMethodInvoker logException

WARNING: com.jme3.system.lwjgl.LwjglCanvas runLoop (LwjglCanvas.java:227)

2012-sep-06 20:44:12 de.lessvoid.nifty.NiftyMethodInvoker logException

WARNING: com.jme3.system.lwjgl.LwjglAbstractDisplay run (LwjglAbstractDisplay.java:228)

2012-sep-06 20:44:12 de.lessvoid.nifty.NiftyMethodInvoker logException

WARNING: java.lang.Thread run (null:-1)

@void256 was this looked into?

@erlend_sh: It was not looked into this since - for a couple of weeks now - the forum refuses do sent me notifications for some reason. Normen said that this was a known issue that was fixed in the meantime but it doesn’t worked for me yet unfortunately.



@rickard:



It seems like there is some onClick() method somewhere that is not accepting String parameters but some other parameters. It crashes somewhere in this method:



[java] private Object callMethod(final Object targetObject, final Method method, final Object[] invokeParameters) {

try {

log.fine("method: " + method + "on targetObject: " + targetObject + ", parameters: " + invokeParameters);

if (method != null) {

log.fine(method.getName());

}

if (invokeParameters != null) {

for (Object o : invokeParameters) {

log.fine("parameter: " + o);

}

}

return method.invoke(targetObject, invokeParameters); // <— NiftyMethodInvoker.java:145

} catch (RuntimeException e) {

[/java]



I think when you enable logging for the class de.lessvoid.nifty.NiftyMethodInvoker with FINE log level then Nifty should tell you exactly what method it tries to call on which object right before the exception:



[java] log.fine("method: " + method + "on targetObject: " + targetObject + ", parameters: " + invokeParameters);[/java]

@void256 said:
the forum refuses do sent me notifications for some reason. Normen said that this was a known issue that was fixed in the meantime but it doesn't worked for me yet unfortunately.

Hmm, that's odd. It should definitely be fixed now. Do note, we're using a new e-mail now, noreply at hub.jmonkeyengine.org. I suggest you search for it and make sure the messages aren't ending up in your junkmail folder because of the new e-mail address.

@erlend_sh: no luck with the spam folder :confused: but I’ll bug you about that somewhere else so that we don’t spam this thread with unrelated issues : )

Hey.



Didn’t see this topic updated until now :slight_smile:



I don’t remember now if i’ve made a work around for it, or if it’s very rare. But i’ll take this info and see if i can repeat it with fine loggin enabled.



/Rickard