Android Question Error debugging "Unable to create service"

Chianca

Member
Licensed User
Longtime User
Developers friends, I'm having problems debugging my project, I've seen several solutions here in the forum, but none helped me. Amongst them:

* Make a Release and then try Debug again.
* Make Ctrl + P
* Debug in legacy mode
* Close the project and reopen
* Restart Widget and PC

Note: The same code is running on another PC and works normally.
 

Attachments

  • image_2019_05_16T22_29_23_145Z.jpg
    image_2019_05_16T22_29_23_145Z.jpg
    67.7 KB · Views: 218

Chianca

Member
Licensed User
Longtime User
Please post the logs as text. Right click to copy.
java.lang.RuntimeException: Unable to create service Chianca.CHAndroid.starter: java.lang.RuntimeException: java.io.EOFException
at android.app.ActivityThread.handleCreateService(ActivityThread.java:3222)
at android.app.ActivityThread.-wrap5(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1580)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6165)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:888)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:778)
Caused by: java.lang.RuntimeException: java.io.EOFException
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 Chianca.CHAndroid.starter.onCreate(starter.java:34)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:3212)
... 8 more
Caused by: java.io.EOFException
at java.io.DataInputStream.readFully(DataInputStream.java:200)
at java.io.DataInputStream.readInt(DataInputStream.java:389)
at anywheresoftware.b4a.shell.Shell.virtualAssets(Shell.java:136)
... 12 more
 
Upvote 0

Chianca

Member
Licensed User
Longtime User
And the above is an even different error than that of your picture.
They are the same error, only changes
java.lang.RuntimeException: java.net.SocketException: Socket closed (conventional Debug)
java.lang.RuntimeException: java.io.EOFException (USB debug mode)
 
Upvote 0

techknight

Well-Known Member
Licensed User
Longtime User
They are the same error, only changes
java.lang.RuntimeException: java.net.SocketException: Socket closed (conventional Debug)
java.lang.RuntimeException: java.io.EOFException (USB debug mode)

Those changes signify they are different errors! Even though they could be triggered by the same thing, they are still different.

When I am in debug mode, I occasionally get that. and it usually happens if the computer is busy with those resources and the compiler cannot take the time away from the OS, so it eventually will time out.

Long story short, the PC is busy doing other things when this happens. May need to increase the timeouts. Not sure if its fixed internally or not.
 
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Caused by: java.io.EOFException
at java.io.DataInputStream.readFully(DataInputStream.java:200)
at java.io.DataInputStream.readInt(DataInputStream.java:389)
at anywheresoftware.b4a.shell.Shell.virtualAssets(Shell.java:136)
This error can happen from two causes:
1. The device app crashed while it started. This might happen if you have invalid code in Process_Globals.
2. Network problem. Maybe the anti virus broke the connection.
 
Upvote 0

Chianca

Member
Licensed User
Longtime User
This error can happen from two causes:
1. The device app crashed while it started. This might happen if you have invalid code in Process_Globals.
2. Network problem. Maybe the anti virus broke the connection.
I think this particular case is not a network problem, because I also do via USB and the same problem occurs. As for the invalid code, would it be in Main Activity?
 
Upvote 0

Chianca

Member
Licensed User
Longtime User
Wich invalid code should I search in all my activities Process Globals?

Errors, initializes, etc?

A think I have only variables declarations...
 
Upvote 0

Chianca

Member
Licensed User
Longtime User
Great News!

I think that the problem is solved.

I've solved tons of warnigs, and debug now is runnig fine!

Thank you so much!!
 
Upvote 0
Top