Android Question Unable to create starter service

Jeffrey Cameron

Well-Known Member
Licensed User
I've researched this on the forum and haven't found a definitive cause or solution so I'd thought I'd post and see if anyone else is having this issue or knows what causes it. Occasionally during development (debug mode) the app compiles then after it starts on the device (random-off-brand-tablet) it just ends. No messages, etc. Digging through the log I can find a message about not creating the starter service:
Failed to create starter service error log:
java.lang.RuntimeException: Unable to create service phx.erpregister.starter: java.lang.RuntimeException: java.net.SocketException: Connection reset
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3376)
    at android.app.ActivityThread.-wrap4(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1701)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6523)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:857)
Caused by: java.lang.RuntimeException: java.net.SocketException: Connection reset
    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 phx.erpregister.starter.onCreate(starter.java:34)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3366)
    ... 8 more
Caused by: java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(SocketInputStream.java:209)
    at java.net.SocketInputStream.read(SocketInputStream.java:139)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:248)
    at java.io.BufferedInputStream.read1(BufferedInputStream.java:288)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:347)
    at java.io.DataInputStream.readFully(DataInputStream.java:198)
    at java.io.DataInputStream.readInt(DataInputStream.java:389)
    at anywheresoftware.b4a.shell.Shell.virtualAssets(Shell.java:136)
    ... 12 more
I can provide some additional input based on the other threads I've read about this problem:
  • I haven't altered my antivirus settings in any way and it hasn't installed any updates as far as I know.
  • I haven't added or updated any new libraries to the project, and I'm only using ones I've created or are stock B4X core libraries.
  • It's not a consistent error, i.e. I can't force it to occur and only appears to happen when compiled in debug mode.
  • Once it happens, it will continue to happen until you reset the device or close/reopen the B4X IDE.
  • Cleaning the project then running will fix it without resetting the device or restarting the IDE.
It's not a big deal as cleaning then running will fix it, but it only started happening after I upgraded to 9.8 (yes, I know that may be coincidental) but I'm worried it's a sign that the project is getting too large, or a deeper issue I've yet to discover or should I just stick to running in release mode all the time and logging my brains out?
 
Top