Android Question Crash in release on pressing back button, runs ok in debug

D. Mano

New Member
Licensed User
Longtime User
I am facing an unusual problem. This is first project in B4A 6.8. I am starting a new activity when http jobdone returns some data.

Now when I click on the phone back button to go back to the main activity, in debug mode all works well, in release mode I get a exception thrown and the app is terminated. Debugging using USB connected device, I get the following logs.

** Activity (main) Resume **
** Service (httputils2service) Create **
** Service (httputils2service) Start **
** Activity (main) Pause, UserClosed = false **
sending message to waiting queue (CallSubDelayed - )
** Activity (contactsfordoc) Create, isFirst = true **
** Activity (contactsfordoc) Resume **
** Activity (contactsfordoc) Pause, UserClosed = true **
running waiting messages (1)
main$ResumeMessagerun (java line: 300)
java.lang.Exception: Sub was not found.
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:185)
at anywheresoftware.b4a.keywords.Common$5$1.run(Common.java:981)
at anywheresoftware.b4a.BA.setActivityPaused(BA.java:408)
at com.welvue.nc.main$ResumeMessage.run(main.java:300)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5938)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1389)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1184)

I have attached a working skeleton project which reproduces the error. Any help would be most welcome, am at my wits end on how to fix this. Have not encountered this in pervious versions of B4A.
 

Attachments

  • ConnectNC.zip
    291.3 KB · Views: 127
Top