Android Question Debug Crash

aaronk

Well-Known Member
Licensed User
Longtime User
Hi,

I was running my app in Debug (legacy) mode and when I run my code I got a message on my phone that said this app has stopped and then the app closed.

In the IDE log it shows:

B4X:
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference
 at anywheresoftware.b4a.debug.Debug$AvoidANR.run(Debug.java:268)
 at android.os.Handler.handleCallback(Handler.java:739)
 at android.os.Handler.dispatchMessage(Handler.java:95)
 at android.os.Looper.loop(Looper.java:148)
 at android.app.ActivityThread.main(ActivityThread.java:5417)
 at java.lang.reflect.Method.invoke(Native Method)
 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

If I then stop the debug and then start it again without changing any code the app then works fine.

Has something happened with the IDE (as did the debug lock up etc) and it caused this error or is there something else that caused this error?
 

aaronk

Well-Known Member
Licensed User
Longtime User
HI,

I am currently using 5.20 (going to update to the latest shortly)

Why aren't you using the rapid debugger?
I have used this but it's very slow when running my project for some reason. (I also found the same issue as above happens with the rapid as well, and happens more often)

When I use it on a basic project it's fast but when I start using SQL, networking, ULV etc it runs slow and I find it runs more reliable in the Legacy for some reason.

Maybe the latest B4A fixes some issues and will try again with that version.
 
Upvote 0
Top