Bug? if then endif

dcoun

Member
Licensed User
Longtime User
B4A v8.0 and I can not reproduce it to an empty app. It did not happen with B4A v7.8 (but I made some modifications since v8.0)
In debugging mode if I stop an application from the IDE I get a lot of exceptions....
The only way not to happen is to change a sub that it runs from starter's service_start and do the following change:
I have exceptions if it is like the following:
B4X:
    Private doupdsql As Object = syssq.ExecNonQueryBatch("UpdSql")
    Wait For (doupdsql) UpdSql_NonQueryComplete (Success As Boolean)
    Log("updateQuery: " & Success) : If Success = False Then Log(LastException)
I have not exceptions if it is like the following:
B4X:
    Private doupdsql As Object = syssq.ExecNonQueryBatch("UpdSql")
    Wait For (doupdsql) UpdSql_NonQueryComplete (Success As Boolean)
    Log("updateQuery: " & Success) : If Success = False Then : Log(LastException) : End If
The exceptions:
java.lang.RuntimeException: java.lang.RuntimeException: java.net.SocketException: Socket closed
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:170)
at anywheresoftware.b4a.BA$2.run(BA.java:360)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
Caused by: java.lang.RuntimeException: java.net.SocketException: Socket closed
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:170)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:166)
at anywheresoftware.b4a.shell.DebugResumableSub$RemoteResumableSub.resume(DebugResumableSub.java:19)
at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:240)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:132)
... 8 more
Caused by: java.net.SocketException: Socket closed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:151)
at java.net.SocketInputStream.read(SocketInputStream.java:120)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
at java.io.BufferedInputStream.read(BufferedInputStream.java:254)
at java.io.DataInputStream.readByte(DataInputStream.java:265)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:335)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:249)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:139)
... 12 more
 
Top