Android Question java.lang.NullPointerException

badal405

Member
Licensed User
Longtime User
Hi,
Unexpectedly I am getting an error and I could not find out why. If i debug line by line I don't get any report but when i release the app and run again I am getting the following error.
B4X:
** Activity (startup) Create, isFirst = true **
** Activity (startup) Resume **
** Activity (startup) Pause, UserClosed = false **
** Activity (update_gflc) Create, isFirst = true **
** Activity (update_gflc) Resume **
update_gflc_spinner6_itemclick (java line: 2162)
java.lang.NullPointerException
    at phss.bgmea.update_gflc._spinner6_itemclick(update_gflc.java:2162)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:507)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175)
    at anywheresoftware.b4a.BA$2.run(BA.java:285)
    at android.os.Handler.handleCallback(Handler.java:587)
    at android.os.Handler.dispatchMessage(Handler.java:92)
    at android.os.Looper.loop(Looper.java:123)
    at android.app.ActivityThread.main(ActivityThread.java:3647)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:507)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
    at dalvik.system.NativeStart.main(Native Method)
java.lang.NullPointerException

then i open the java file and look to the line number 2162 and i found following comments.
_col = (int) (2);
//BA.debugLineNum = 951;BA.debugLine="If fn.cCursor.GetString2(col)<>zone AND fn.cCursor.GetString2(col)<>Null Then'loading zone";
if ((mostCurrent._fn._ccursor.GetString2(_col)).equals(_zone) == false && mostCurrent._fn._ccursor.GetString2(_col)!= null) {
//BA.debugLineNum = 952;BA.debugLine="Spinner12.Add(fn.cCursor.GetString2(col))";
mostCurrent._spinner12.Add(mostCurrent._fn._ccursor.GetString2(_col));
//BA.debugLineNum = 953;BA.debugLine="zone=fn.cCursor.GetString2(col)";
_zone = mostCurrent._fn._ccursor.GetString2(_col);
};
 
Top