Android Question Api 28 bug

yiankos1

Well-Known Member
Licensed User
Longtime User
Hell my friends,
I have this error only on api 28 smartphone:
B4X:
Error occurred on line: 915 (Test)
java.lang.NullPointerException: Attempt to read from field 'anywheresoftware.b4a.BA gr.taxabro.DiplomaAytokinitou.test.activityBA' on a null object reference
    at gr.taxabro.DiplomaAytokinitou.test._listviews(test.java:835)
    at gr.taxabro.DiplomaAytokinitou.test._btnnext_click(test.java:1758)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:180)
    at de.donmanfred.IconButtonWrapper$1.onClick(IconButtonWrapper.java:72)
    at android.view.View.performClick(View.java:6597)
    at android.view.View.performClickInternal(View.java:6574)
    at android.view.View.access$3100(View.java:778)
    at android.view.View$PerformClick.run(View.java:25885)
    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)
Occurs when @DonManfred iconButton click event raises.
 

yiankos1

Well-Known Member
Licensed User
Longtime User
i figure it out. There was this sub:
B4X:
Sub listviews
    If quitFlag =True Then Return True
End Sub
and i was calling it from icon button click event. So i moved the code from this sub to clickevent sub and bug gone!
 
Upvote 0
Top