HI, All
App user informed me that the latest version is stopped after some time.
After some test i have found that after 360 seconds ALWAYS app is stopped with such error, even in the Debug mode:
Starter.tim_Tick: 357
Starter.tim_Tick: 358
Starter.tim_Tick: 360
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean anywheresoftware.b4a.BA.isActivityPaused()' on a null object reference
at anywheresoftware.b4a.objects.Timer$TickTack.run(Timer.java:104)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8663)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
It seems to me that it is some timer tick sub and isPaused function. But i cannot find such function usage in all timers subs.
App is old, and i found that DOEVENTS is still used, but not all places, some are already with Sleep(0) instead.
And when i placed DOEVENTS everywere instead of Sleep(0) .... hanging is over, app works fully OK.
When to use Sleep(0) - it's again error.
How to understand it ?