exception when doing controller.find()

Hello,

on one of my forms I get an error when doing controller.find(). Can anyone see from the log what goes wrong here?:

org.mozilla.javascript.JavaScriptException: java.lang.NullPointerExceptionorg.mozilla.javascript.JavaScriptException: java.lang.NullPointerException
at org.mozilla.javascript.JavaScriptException.wrapException(JavaScriptException.java:71)
at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:457)
at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1249)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:1942)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:94)
at com.servoy.j2db.scripting.e.call(Unknown Source)
at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1249)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:1942)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:94)
at com.servoy.j2db.scripting.e.call(Unknown Source)
at com.servoy.j2db.develop.debugger.k.a(Unknown Source)
at com.servoy.j2db.develop.debugger.k.executeFunction(Unknown Source)
at com.servoy.j2db.FormPanel.a(Unknown Source)
at com.servoy.j2db.FormPanel.a(Unknown Source)
at com.servoy.j2db.FormPanel$b.a(Unknown Source)
at com.servoy.j2db.dataui.AbstractScriptLabel.a(Unknown Source)
at com.servoy.j2db.dataui.AbstractScriptLabel.access$5(Unknown Source)
at com.servoy.j2db.dataui.AbstractScriptLabel$5.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at javax.swing.plaf.basic.BasicTableUI$Handler.repostEvent(Unknown Source)
at javax.swing.plaf.basic.BasicTableUI$Handler.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
java.lang.NullPointerException
at com.servoy.j2db.dataui.SpecialTabPanel.setValidationEnabled(Unknown Source)
at com.servoy.j2db.dataprocessing.d.if(Unknown Source)
at com.servoy.j2db.FormPanel.u(Unknown Source)
at com.servoy.j2db.dataui.SpecialTabPanel.setValidationEnabled(Unknown Source)
at com.servoy.j2db.dataprocessing.d.if(Unknown Source)
at com.servoy.j2db.FormPanel.u(Unknown Source)
at com.servoy.j2db.FormPanel.null(Unknown Source)
at com.servoy.j2db.FormPanel.cN(Unknown Source)
at com.servoy.j2db.FormPanel.access$0(Unknown Source)
at com.servoy.j2db.FormPanel$JSForm.js_find(Unknown Source)
at inv8.invoke()
at org.mozilla.javascript.FunctionObject.doInvoke(FunctionObject.java:537)
at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:453)
at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1249)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:1942)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:94)
at com.servoy.j2db.scripting.e.call(Unknown Source)
at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1249)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:1942)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:94)
at com.servoy.j2db.scripting.e.call(Unknown Source)
at com.servoy.j2db.develop.debugger.k.a(Unknown Source)
at com.servoy.j2db.develop.debugger.k.executeFunction(Unknown Source)
at com.servoy.j2db.FormPanel.a(Unknown Source)
at com.servoy.j2db.FormPanel.a(Unknown Source)
at com.servoy.j2db.FormPanel$b.a(Unknown Source)
at com.servoy.j2db.dataui.AbstractScriptLabel.a(Unknown Source)
at com.servoy.j2db.dataui.AbstractScriptLabel.access$5(Unknown Source)
at com.servoy.j2db.dataui.AbstractScriptLabel$5.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at javax.swing.plaf.basic.BasicTableUI$Handler.repostEvent(Unknown Source)
at javax.swing.plaf.basic.BasicTableUI$Handler.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

I narrowed the problem: the form that is giving the error has a tab panel that also shows tabs of a module. That module was not present when I did controller.find(). If the module is there, I don’t get that error.

Added more checks to prevent, will be availeble in Servoy 2.2 rc6/final