Android Question Crash upon exiting activity

ValDog

Active Member
Licensed User
Longtime User
Upon leaving an activity module, pressing Back button, my application crashes. Here is the relevant (?) unfiltered log entries - can anyone shed any light on what may be the problem - or how to proceed? Thanks in advance!


** Activity (dataxfer) Pause, UserClosed = true **
Duplicate finish request for ActivityRecord{427aead0 u0 b4a.gsight/.dataxfer t560 f}
ignoring event: gps1_locationchanged
sCommBuffer = #H %00000000 1560
Bad call: specified package com.google.android.googlequicksearchbox under uid 10019 but it is really 10053
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.shell.Shell.stopProgram(Shell.java:167)
at anywheresoftware.b4a.shell.Shell.handleIncomingData(Shell.java:181)
at anywheresoftware.b4a.shell.ShellConnector.readControlData(ShellConnector.java:204)
at anywheresoftware.b4a.shell.ShellConnector.connect(ShellConnector.java:185)
at anywheresoftware.b4a.shell.ShellConnector.run(ShellConnector.java:119)
at java.lang.Thread.run(Thread.java:841)

Caused by: java.lang.NullPointerException
at b4a.gsight.main.killProgram(main.java:328)
... 8 more
VM exiting with result code 0, cleanup skipped.
Process b4a.gsight (pid 26466) has died.
WIN DEATH: Window{42e09478 u0 b4a.gsight/b4a.gsight.selectrecs}
 

ValDog

Active Member
Licensed User
Longtime User
Can you post the code in dataxfer Activity_Pause?

Sub Activity_Pause (UserClosed As Boolean)
If UserClosed Then Activity.Finish
End Sub

I've also tried it with:

Sub Activity_Pause (UserClosed As Boolean)

End Sub
 
Upvote 0

ValDog

Active Member
Licensed User
Longtime User
Your code creates an endless loop. You don't need to call Activity.Finish in this case as the activity is going to be destroyed anyway.

Not sure I understand what you mean about creating an endless loop.


Update: I've managed to solve my problem - still not sure why my solution works, but I'll live with it.
 
Last edited:
Upvote 0
Top