Android Question Version 8.5 Crashes when debugging, Release and Legacy Debug works

Jon Eskdale

Member
Licensed User
Longtime User
Hi - I've spent several hours without finding the solution to this issue.
I've used B4A about a year ago very successfully but have upgraded Laptop and have installed the latest B4A 8.50
I'm testing with the MyFirstProgram using source from \Booklets\Getting Started\SourceCode\MyFirstProgram\B4A and if I run it in Release mode all is good.
if I run it in Debug then I get the file not found error for Main.bal

B4X:
Logger connected to:  samsung SM-N9005
--------- beginning of main
Copying updated assets files (1)
java.lang.RuntimeException: java.io.FileNotFoundException: /storage/emulated/0/Android/data/b4a.MyFirstProgram/files/virtual_assets/main.bal: open failed: ENOENT (No such file or directory)
    at anywheresoftware.b4a.shell.Shell.virtualAssets(Shell.java:169)
    at anywheresoftware.b4a.shell.Shell.start(Shell.java:102)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:92)
    at b4a.MyFirstProgram.main.afterFirstLayout(main.java:96)
    at b4a.MyFirstProgram.main.access$000(main.java:17)
    at b4a.MyFirstProgram.main$WaitForLayout.run(main.java:82)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:145)
    at android.app.ActivityThread.main(ActivityThread.java:5938)
    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:1400)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)
Caused by: java.io.FileNotFoundException: /storage/emulated/0/Android/data/b4a.MyFirstProgram/files/virtual_assets/main.bal: open failed: ENOENT (No such file or directory)
    at libcore.io.IoBridge.open(IoBridge.java:456)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:87)
    at anywheresoftware.b4a.objects.streams.File.OpenOutput(File.java:448)
    at anywheresoftware.b4a.shell.Shell.virtualAssets(Shell.java:156)
    ... 13 more
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
    at libcore.io.Posix.open(Native Method)
    at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
    at libcore.io.IoBridge.open(IoBridge.java:442)
    ... 16 more
Copying updated assets files (1)
java.lang.RuntimeException: java.io.FileNotFoundException: /storage/emulated/0/Android/data/b4a.MyFirstProgram/files/virtual_assets/main.bal: open failed: ENOENT (No such file or directory)
    at anywheresoftware.b4a.shell.Shell.virtualAssets(Shell.java:169)
    at anywheresoftware.b4a.shell.Shell.start(Shell.java:102)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:92)
    at b4a.MyFirstProgram.main.afterFirstLayout(main.java:96)
    at b4a.MyFirstProgram.main.access$000(main.java:17)
    at b4a.MyFirstProgram.main$WaitForLayout.run(main.java:82)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:145)
    at android.app.ActivityThread.main(ActivityThread.java:5938)
    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:1400)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)
Caused by: java.io.FileNotFoundException: /storage/emulated/0/Android/data/b4a.MyFirstProgram/files/virtual_assets/main.bal: open failed: ENOENT (No such file or directory)
    at libcore.io.IoBridge.open(IoBridge.java:456)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:87)
    at anywheresoftware.b4a.objects.streams.File.OpenOutput(File.java:448)
    at anywheresoftware.b4a.shell.Shell.virtualAssets(Shell.java:156)
    ... 13 more
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
    at libcore.io.Posix.open(Native Method)
    at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
    at libcore.io.IoBridge.open(IoBridge.java:442)
    ... 16 more
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
--------- beginning of system

If I turn on Legacy debugging it works

I'm guessing there is a permission error somewhere but where?
I'm using a Note 3 with the Bridge 2.53 (which I've uninstalled and reinstalled)

If I'm getting this issue though many others may also get it when trying to get started.
So hopefully someone can help - Thanks
 
Top