Android Question Unable to create starter service

fbritop

Active Member
Licensed User
Longtime User
Using B4A 8.80, only happens in debug. I have tried changing perms on the manifiest to:
B4X:
AddPermission(android.permission.WRITE_EXTERNAL_STORAGE)

Althow I never write to external storage. Also tried what stays in Internal Library Updates post:
https://www.b4x.com/android/forum/threads/updates-to-internal-libraries.59340/ regarding the debug.jar, but then it outputs another error

Log results are:
B4X:
java.lang.RuntimeException: Unable to create service cl.abreme.android.starter: java.lang.RuntimeException: java.io.EOFException
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3878)
    at android.app.ActivityThread.-wrap5(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1989)
    at android.os.Handler.dispatchMessage(Handler.java:108)
    at android.os.Looper.loop(Looper.java:166)
    at android.app.ActivityThread.main(ActivityThread.java:7425)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
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 cl.abreme.android.starter.onCreate(starter.java:34)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3858)
    ... 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

Any clues???
 

walterf25

Expert
Licensed User
Longtime User
You need to use Runtime Permissions library.

Walter
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

fbritop

Active Member
Licensed User
Longtime User
Yes but it is totally random behaivior. Sometimes happens and sometimes does not with the same project.
 
Upvote 0

fbritop

Active Member
Licensed User
Longtime User
Not sure about the network problem, as is connected through USB. There is no AV installed and Windows Defender service is stopped
 
Upvote 0

fbritop

Active Member
Licensed User
Longtime User
@Erel , not sure if it is related. Today this issue became really nasty.
Clean Project BAD
Restart ADB BAD
Unplug USB and plug it again BAD
Force App to Quit before compile BAD
Uninstall App OK

The app then crash because of a programming error of mine, and we are all set back to cannot start starter service

The problem was solved, not sure if forever, but after cleaning the cache from App Settings from the phone. Also I notice that the debbuger speed was also increased after deleting the cache.

I´m not an expert about background files in Android, but is the first time that with one shot I have an stable IDE for debugging. You may want to have a look on how cache files affect B4A.

Cheers
FBP
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…