Android Question Release works fine but Debug mode crashes

Discussion in 'Android Questions' started by Kevin Hartin, Apr 2, 2019.

  1. Kevin Hartin

    Kevin Hartin 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
     
  2. Erel

    Erel Administrator Staff 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)?
     
  3. Kevin Hartin

    Kevin Hartin Member Licensed User

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

    package name is changed.

    Thanks,
    Kev
     
  4. emexes

    emexes Active Member 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.
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    This might happen because of illegal code in one of the process global subs. If the project is not too large then you can send it to me and I'll try it here.
     
    Shelby likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice