Android Question Release works fine but Debug mode crashes

Kevin Hartin

Active Member
Licensed User
It was fine until then I run in Debug mode I am now getting the following error in the Logs;

Logger connected to: samsung SM-G955F
--------- beginning of crash
--------- beginning of main
Copying updated assets files (52)
java.lang.RuntimeException: Unable to create service com.MS.MStour.starter: java.lang.RuntimeException: java.net.SocketException: Socket closed
at android.app.ActivityThread.handleCreateService(ActivityThread.java:3762)
at android.app.ActivityThread.access$1400(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1801)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7045)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)
Caused by: java.lang.RuntimeException: java.net.SocketException: Socket closed
at anywheresoftware.b4a.shell.Shell.virtualAssets(Shell.java:164)
at anywheresoftware.b4a.shell.Shell.start(Shell.java:102)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:92)
at com.MS.MStour.starter.onCreate(starter.java:34)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:3750)
... 8 more
Caused by: java.net.SocketException: Socket closed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:119)
at java.net.SocketInputStream.read(SocketInputStream.java:176)
at java.net.SocketInputStream.read(SocketInputStream.java:144)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:248)
at java.io.BufferedInputStream.read(BufferedInputStream.java:267)
at java.io.DataInputStream.readByte(DataInputStream.java:268)
at anywheresoftware.b4a.shell.ShellConnector.readObject(ShellConnector.java:242)
at anywheresoftware.b4a.shell.Shell.virtualAssets(Shell.java:146)
... 12 more
 

Kevin Hartin

Active Member
Licensed User
If you haven't yet released your app, I recommend you to change the package name to com.ms.mstour.

Have you tried to clean the project (Ctrl + P)?

Clean project made no difference, however using the legacy debugger seems to work...

package name is changed.

Thanks,
Kev
 
Upvote 0

emexes

Expert
Licensed User
I occasionally have the logging go AWOL on me, but so far doesn't happen frequently enough that I've been able to pin down the precise cause or solution (plus, when it does happen, it's usually late a night when I'm under the pump to finish off "a few simple changes, then I'm done" and have no time for troubleshooting)

The solution so far has been to reset everything. Terminate all apps and then turn the mobile device off and back on again, shut down all Windows programs and reboot the laptop, Tools Clean Project, add all the #Debugger options that look helpful, then give it another burl. I feel like one time it was resetting the router that fixed it (I use B4ABridge over wifi).

One day it will happen when I'm not under pressure, and I'll have time to try the fixes one-by-one to identify which one works, which might then give me a clue as to what causes it to happen in the first place.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…