Error assigning value to global variable

I recently upgraded to rc6. It causes an error to my logic which was working well during the earlier version. My logic is,

In my linking form, I got 2 portals. Left (availbale list) and right (linked list). I got 2 buttons to move records in between them. (You might have seen such logic in lots of applications). Okay, it is working fine until I move all left (availbale) portal records to right (linked) portal. When I move it back, it gives out an error. The error is,

To move between portals, firstly I am getting the portal field value to a local variable. Then assign this local variable to a global variable. The error is capturing at this point, i.e. at assigning local variable to that global variable. (strange??? all are integer and working well until before rc6). It throws “null pointer exception”. Any clue?.


shaikna - Hong Kong

i have to see the complete stacktrace (see .log.txt file in servoy dir)
also do you have an example that i can test

Below quoted is the one I got in .log.txt

Starting Servoy R2 2.0 rc6 build-265 on Windows XP using Java 1.4.2_03java.lang.NullPointerExceptionjava.lang.NullPointerException
at com.servoy.j2db.dataprocessing.h.getValue(Unknown Source)
at com.servoy.j2db.dataprocessing.t.a(Unknown Source)
at com.servoy.j2db.dataprocessing.v.a(Unknown Source)
at com.servoy.j2db.dataprocessing.h.if(Unknown Source)
at com.servoy.j2db.dataprocessing.h.a(Unknown Source)
at com.servoy.j2db.dataprocessing.c.if(Unknown Source)
at com.servoy.j2db.dataprocessing.c.do(Unknown Source)
at com.servoy.j2db.dataprocessing.h.setValue(Unknown Source)
at com.servoy.j2db.dataprocessing.h.put(Unknown Source)
at com.servoy.j2db.dataprocessing.FoundSet.put(Unknown Source)
at org.mozilla.javascript.ScriptRuntime.setProp(ScriptRuntime.java:839)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:1832)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:94)
at com.servoy.j2db.scripting.e.call(Unknown Source)
at com.servoy.j2db.develop.c.i.executeFunction(Unknown Source)
at com.servoy.j2db.FormPanel.a(Unknown Source)
at com.servoy.j2db.FormPanel.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.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.pumpEventsForHierarchy(Unknown Source)
at java.awt.Dialog$1.run(Unknown Source)
at java.awt.Dialog.show(Unknown Source)
at java.awt.Component.show(Unknown Source)
at java.awt.Component.setVisible(Unknown Source)
at com.servoy.j2db.util.b.setVisible(Unknown Source)
at com.servoy.j2db.f.setVisible(Unknown Source)
at com.servoy.j2db.f.a(Unknown Source)
at com.servoy.j2db.FormManager.a(Unknown Source)
at com.servoy.j2db.scripting.JSApplication.js_showFormInDialog(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:289)
at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1232)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:1940)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:94)
at com.servoy.j2db.scripting.e.call(Unknown Source)
at com.servoy.j2db.develop.c.i.executeFunction(Unknown Source)
at com.servoy.j2db.FormPanel.a(Unknown Source)
at com.servoy.j2db.FormPanel.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.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)

that is very strange..
that latest getValue call is called all the time and i have no idee why it is throwing an null ..

but it doesn’t have anything to do with a global.. Because you are storing a record dataprovider at the momenet of the nullpointer.

so i have to have a reproduceable testcase to track this down.

Here is my reproduceable case. The zip file contains basekite.gdb & ***.servoy. create a db server “basekite” for that gdb and import the solution and test it. thanks.

and when do i get that error?
(remember i am testing it on RC7 now)

In RC7, it is okay for me too.

As I said earlier, I was getting that problem only in RC6. I haven’t got that in prior release. So, I presume it might be a bug in RC6 only.