Android Question Emulator and bridge stop working in debug-mode

TheRealMatze

Active Member
Licensed User
Hi,
today my emulator and phone stop working when i´m in debug-mode. I got this error

B4X:
--------- beginning of crash
java.lang.RuntimeException: Unable to create service **********.starter: java.lang.RuntimeException: java.io.EOFException
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3544)
    at android.app.ActivityThread.access$1300(ActivityThread.java:199)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1666)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6669)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
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 sx.datacollector.starter.onCreate(starter.java:34)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3532)
    ... 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

In release-mode it works. Already created a new emulator-device, but the same error again.

I didn´t change anything (expect my timestamp-string). What means this end-of-file-error?

Regards
Matze
 

agraham

Expert
Licensed User
Longtime User
In the past people have seen this error in the debugger when running code in Process_Globals and Globals. You should only declare and initialise variables in them.

Also it seems to be a problem with virtual asssets in the debugger. Try adding this project attribute

#DebuggerForceStandardAssets: True
 
Upvote 0

TheRealMatze

Active Member
Licensed User
There was no code in the globals, but the line #DebuggerForceStandardAssets: True fixed the problem. Because i didn´t change anything - is this a pre-sign of an error?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
You are using B4A 11.5 and you are using the new SDK? Just to make sure this is not the problem.
 
Upvote 0

TheRealMatze

Active Member
Licensed User
Yes, 11.5. SDK is version: 6609375, is this the latest?

It´s working one time, now there is a new error.

B4X:
java.lang.RuntimeException: Unable to create service ********.starter: java.lang.RuntimeException: java.net.SocketException: Socket closed
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3544)
    at android.app.ActivityThread.access$1300(ActivityThread.java:199)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1666)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6669)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.RuntimeException: java.net.SocketException: Socket closed
    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 sx.datacollector.starter.onCreate(starter.java:34)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3532)
    ... 8 more
Caused by: java.net.SocketException: Socket closed
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.socketRead(SocketInputStream.java:119)
    at java.net.SocketInputStream.read(SocketInputStream.java:176)
    at java.net.SocketInputStream.read(SocketInputStream.java:144)
    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

Edit: When i try to start again the first error message appears again...
 
Upvote 0

TheRealMatze

Active Member
Licensed User
I have no second project, a empty project starts...
After reboot i got this message when starting the emulator

1649766413602.png


Never see this before... Can´t find "extended controls"...

Edit: When i start the app in debug-mode the screen on the emulator goes black and i see on the bottom "Waiting for IDE debugger to connect". After ~6 seconds the black screen closes and the error appears.
 
Last edited:
Upvote 0

TheRealMatze

Active Member
Licensed User
I can´t find what´s wrong... Now i return direct after showhing the app splash-screen,

B4X:
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.LoadLayout("splash")
  
    #if b4a
    version.text=Application.VersionName '"0.9
    #end if
    #if b4i
    version.text=AppVersion
    #End If
 
    Log("da bin ich!")
    Log(File.DirInternal)

    Return
    initApp
End Sub

When i remove Log(File.DirInternal) i see my splash, if not i got this error. I can´t reproduce it otherwise...
When i replace it with Log(File.DirAssets) it starts also File.DirInternalCache works.

I see the error when i call File.DirInternal or File.DirRootExternal. The last one is not used, the first one is used (for the database)...

Edit: My backup from last week is also not longer working. This version is definitly untouched...

Edit Edit: Tested the ios-version without problems. Maybe it´s a problem with the b4a / emulator - installation...
 
Last edited:
Upvote 0
Top