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: Socket closed
    at android.os.Handler.dispatchMessage(
    at android.os.Looper.loop(
    at java.lang.reflect.Method.invoke(Native Method)
    Caused by: java.lang.RuntimeException: Socket closed
    at anywheresoftware.b4a.ShellBA.raiseEvent2(
    at com.MS.MStour.starter.onCreate(
    ... 8 more
    Caused by: Socket closed
    at Method)
    ... 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

    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.

  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.
  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