Bug? Creating new .bal with designer gives File not Found in B4A 9 Beta


Licensed User

when i create a File with designer with file, new or save as of an existing file, i get that error when debugging on device:

Error occurred on line: 28 (AddProject)
java.io.FileNotFoundException: /data/data/de.aoda.android.plakatmanager/files/virtual_assets/addproject.bal: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:409)
at java.io.FileInputStream.<init>(FileInputStream.java:78)
at anywheresoftware.b4a.objects.streams.File.OpenInput(File.java:204)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:82)
at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
at de.aoda.android.plakatmanager.addproject._activity_create(addproject.java:358)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at de.aoda.android.plakatmanager.addproject.afterFirstLayout(addproject.java:104)
at de.aoda.android.plakatmanager.addproject.access$000(addproject.java:17)
at de.aoda.android.plakatmanager.addproject$WaitForLayout.run(addproject.java:82)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5584)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
at dalvik.system.NativeStart.main(Native Method)
Caused by: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
at libcore.io.IoBridge.open(IoBridge.java:393)
... 25 more​

Copying this .bal out of the project and readding gives the same error.
Copying a working .bal file on filesystem, adding it to the project and changing it with the designer is working as aspected.



Licensed User
btw. I already saw that before, and ever ever ever (...) saved designer-files only lowercase....


Licensed User
But I get the same error when doing all that in a folder outside of the dropbox folder....


Licensed User
I think, these are two different problems...
These Uppercase Problem is a known Problem for me even with the releases before.
To avoid that, I don't use uppercase letters in filenames.
Normally if I used an uppercase letter then it could be fixed by deleting the file from the files-tab, changing the filename to lowercase und then reimporting.
These .bal files are useable in the project.

The problem I have since I installed the beta:

Even deleting an reimporting these .bal files doesn't work.
When I create the .bal file in designer it seems to be corrupt or something like that. I could open this file in the designer, save, open save etc. Everything i ok.
But i can't use it in the project with loadlayout

Taking an (older) existing .bal from another project, deleting all the objects, adding the needed one, saving the file and importing it to the new project works fine.
duplicating a (working) .bal on filesystem, adding to project, editing with designer works.

All newly created .bal files won't work. And I found no way to get them working (They work in designer, not in the project)


Licensed User
Hmm, adding the "corrupt" .bal (exists outside the project) with the filestab gives a not working project. Adding it with designer: Files->open to the project gives a working project... seems like the designer is rapairing the file...