Android Question error on start(with raip debug mode)

icefairy333

Active Member
Licensed User
Longtime User
Code: Copy
java.lang.RuntimeException: Unable to create service com.zaiten.kpjj.starter: java.lang.RuntimeException: java.io.EOFException
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:2887)
    at android.app.ActivityThread.-wrap4(ActivityThread.java)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1427)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:148)
    at android.app.ActivityThread.main(ActivityThread.java:5417)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.RuntimeException: java.io.EOFException
    at anywheresoftware.b4a.shell.Shell.virtualAssets(Shell.java:167)
    at anywheresoftware.b4a.shell.Shell.start(Shell.java:99)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:88)
    at com.zaiten.kpjj.starter.onCreate(starter.java:32)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:2877)
    ... 8 more
Caused by: java.io.EOFException
    at libcore.io.Streams.readFully(Streams.java:83)
    at java.io.DataInputStream.readInt(DataInputStream.java:103)
    at anywheresoftware.b4a.shell.Shell.virtualAssets(Shell.java:139)
    ... 12 more
 
Without seeing your project it is hard to give any congrete answer.

All i can see is there is a End of File exception.
 
Upvote 0
Hey Guys, Was this issue resolved?
if so please let me know what is the solution.
By the way I have tried

Code: Copy
#DebuggerForceStandardAssets: true
 
Last edited:
Upvote 0
Do you see the exact same error message?
Not always

Make sure that your app is not starting from an intent or from a call to StartServiceAt.
This is not the case

Here is the interesting thing.
Ironically after I posted my message, I decided to try the rapid debugger one more time. Surprisingly, it started to work, and when it gave an issue, I cleared app data, recompiled and it started to work again (I don't know if this is was coincidence, I was just trying things). It worked for over 18 hours( I was the happiest person on earth). Then it stopped, and now I can't get it to work no matter what I do.

The funny thing is this: when it stopped. It happened out of nowhere, I was working on the code. I modified the code, I hit CTRL+S, it showed that the compile was successful, but never changed the message color to green (CTRL+S to update). So I stopped the debugger and I clicked "Compile and Run". I was unable to get it to work again. I tried everything: rebooting, tablet & PC, clean project, recompile, uninstall, nothing works

Here is the most common error message I get

Code: Copy
java.lang.RuntimeException: Unable to create service xxxx.packagename.starter: java.lang.RuntimeException: java.net.SocketException: Socket closed
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3272)
    at android.app.ActivityThread.access$1900(ActivityThread.java:181)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1557)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:145)
    at android.app.ActivityThread.main(ActivityThread.java:6117)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
Caused by: java.lang.RuntimeException: java.net.SocketException: Socket closed
    at anywheresoftware.b4a.shell.Shell.virtualAssets(Shell.java:168)
    at anywheresoftware.b4a.shell.Shell.start(Shell.java:100)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:88)
    at com.hidata.cabcubedriver.starter.onCreate(starter.java:32)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3262)
    ... 9 more
Caused by: java.net.SocketException: Socket closed
    at libcore.io.Posix.recvfromBytes(Native Method)
    at libcore.io.Posix.recvfrom(Posix.java:161)
    at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:250)
    at libcore.io.IoBridge.recvfrom(IoBridge.java:553)
    at java.net.PlainSocketImpl.read(PlainSocketImpl.java:485)
    at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:37)
    at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:237)
    at java.io.InputStream.read(InputStream.java:162)
    at java.io.BufferedInputStream.fillbuf(BufferedInputStream.java:149)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:295)
    at libcore.io.Streams.readFully(Streams.java:81)
    at java.io.DataInputStream.readInt(DataInputStream.java:103)
    at anywheresoftware.b4a.shell.Shell.virtualAssets(Shell.java:140)
    ... 13 more
 
Last edited:
Upvote 0
Thanks Erel

I disabled the Firewall and Windows Defender. It seems ok for the last 24 hours.
 
Upvote 0
For no apparent reason, it stops working, then it starts to work again, then it stops.
It's fine for me, just letting you know.
 
Last edited:
Upvote 0
Was there ever a clearer solution found as to why this happens? It happens regularly to me, and to resolve it I generally have to run my app in release mode and then go back to debug mode after that. Sometimes this doesn't help though and I'm forced to restart my laptop to get it going again.

I did also add #DebuggerForceStandardAssets: true to the code but that doesn't seem to have helped
 
Upvote 0
Back
Top