B B4A Enthusiast Member Licensed User Longtime User Sep 10, 2020 #1 ** Activity (main) Create, isFirst = false ** ** Activity (main) Resume ** java.lang.ArrayIndexOutOfBoundsException: length=1; index=1 customlistview_getsize (java line: 188) java.lang.NullPointerException: Attempt to invoke virtual method 'int anywheresoftware.b4a.objects.collections.List.getSize()' on a null object reference at co.ke.softlandict.medbossmobile_1.customlistview._getsize(customlistview.java:188) at co.ke.softlandict.medbossmobile_1.main._formatpatientsviews(main.java:7626) at co.ke.softlandict.medbossmobile_1.main._jobdone(main.java:10206) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213) at anywheresoftware.b4a.keywords.Common$11.run(Common.java:1178) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) java.lang.NullPointerException: Attempt to invoke virtual method 'int anywheresoftware.b4a.objects.collections.List.getSize()' on a null object reference What could be causing this error? Thanks.
** Activity (main) Create, isFirst = false ** ** Activity (main) Resume ** java.lang.ArrayIndexOutOfBoundsException: length=1; index=1 customlistview_getsize (java line: 188) java.lang.NullPointerException: Attempt to invoke virtual method 'int anywheresoftware.b4a.objects.collections.List.getSize()' on a null object reference at co.ke.softlandict.medbossmobile_1.customlistview._getsize(customlistview.java:188) at co.ke.softlandict.medbossmobile_1.main._formatpatientsviews(main.java:7626) at co.ke.softlandict.medbossmobile_1.main._jobdone(main.java:10206) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213) at anywheresoftware.b4a.keywords.Common$11.run(Common.java:1178) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) java.lang.NullPointerException: Attempt to invoke virtual method 'int anywheresoftware.b4a.objects.collections.List.getSize()' on a null object reference What could be causing this error? Thanks.
DonManfred Expert Licensed User Longtime User Sep 10, 2020 #2 You are trying to access the 2nd Index from a List which only contains one Item. 1st Item = Index 0 2nd Item = Index 1 Upvote 0
You are trying to access the 2nd Index from a List which only contains one Item. 1st Item = Index 0 2nd Item = Index 1