Android Question Unable to create service starter: java.lang.RuntimeException: java.io.EOFException

ernschd

Active Member
Licensed User
Longtime User
Hello,

i have the problem that i can only start the app in release mode. In debug mode I get this message when compiling:
B4X:
Copying updated assets files (80)
java.lang.RuntimeException: Unable to create service my.App.V3.starter: java.lang.RuntimeException: java.io.EOFException
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3422)
    at android.app.ActivityThread.-wrap4(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1699)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6651)
    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:810)
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 my.App.V3.starter.onCreate(starter.java:34)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3412)
    ... 8 more
Caused by: java.io.EOFException
    at java.io.DataInputStream.readByte(DataInputStream.java:270)
    at anywheresoftware.b4a.shell.ShellConnector.readObject(ShellConnector.java:242)
    at anywheresoftware.b4a.shell.Shell.virtualAssets(Shell.java:146)
    ... 12 more

Unfortunately, I cannot see where the error is.
Can someone please help me?
 

ernschd

Active Member
Licensed User
Longtime User
I don't even know that this is possible 😁
No, I haven't found any code in Globals or Process_Globals.
 
Upvote 0

eps

Expert
Licensed User
Longtime User
Is this really an error at compilation time or is it at execution?

I would try the following in the Manifest File....

B4X:
#DebuggerForceStandardAssets : true

Although there might be a more recent solution
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
I don't even know that this is possible
it is not.

Note that you can only use variable declaration (dim x as string) but NOT setting any Values (x="y")

It would help if you upload your project or at least post the code in Globals and Process_Globals (from any module).
 
Upvote 0

ernschd

Active Member
Licensed User
Longtime User
Is this really an error at compilation time or is it at execution?

I would try the following in the Manifest File....

B4X:
#DebuggerForceStandardAssets : true

Although there might be a more recent solution

I'm sorry, the project is compiling, and right after execution the error message appears and the app is exiting. But only in debug mode.
DebuggerForceStandardAssets is not making a difference.
 
Upvote 0

ernschd

Active Member
Licensed User
Longtime User
I'm confused: I changed android:targetSdkVersion from 26 to 29.
Then the project has compiled and started in debug mode. In the log, at the beginning there is: "Copying updated assets files (79)" - and this only in debug mode!
On a second try it didn't work anymore, only if I compile in release mode before.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
I changed android:targetSdkVersion from 26 to 29.
Did you adapt your app to be ready for targetsdk 29? There are some changes needed.

Also you still did not uploaded some code. Based on the error i would expect you have code running in process_global which should not there.

This is usually related to code inside one of the global subs. In most cases there would be a warnings about it.

Have you tried to disable firewall?
One of the similar problem-threads

 
Upvote 0

ernschd

Active Member
Licensed User
Longtime User
Here are the Globals and Process_Globals declarations.

Setting targetsdk to 29 was just a attempt.
 

Attachments

  • subs.zip
    21.6 KB · Views: 182
Upvote 0

ernschd

Active Member
Licensed User
Longtime User
Current state: it works now (I've pulled an older version from Git). Unfortunately I can't say what the reason is. When I compare the changes, I don't see any relevant differences.
But the main thing is that I can continue working now.

Thanks a lot to everyone for your help!
 
Upvote 0
Top