I have been developing my current project for some while and the main Activity code has been running quite happily for many days.
One day the program starts halting on runtime at 'Page1.RootPanel.LoadLayout("main")' saying there is no such layout. The files tab shows the layout there as expected. I suspected a system-level I/O or sharing problem but the file can be renamed/moved/deleted on the PC as normal.
After opening the layout in the designer and then saving again the exception disappears and the layout becomes accessible to the code once again??? This has now happened on three consecutive boot-ups.
But further down.....
From the log:
One day the program starts halting on runtime at 'Page1.RootPanel.LoadLayout("main")' saying there is no such layout. The files tab shows the layout there as expected. I suspected a system-level I/O or sharing problem but the file can be renamed/moved/deleted on the PC as normal.
After opening the layout in the designer and then saving again the exception disappears and the layout becomes accessible to the code once again??? This has now happened on three consecutive boot-ups.
But further down.....
B4X:
Private bmp as Bitmap
...
Fname = "ls-large.jpg"
...
Log("Fname= " & Fname)
bmp.Initialize(File.DirAssets,Fname) 'runtime error on this line
imgBackground.Bitmap = bmp
From the log:
I have tried cleaning the project, removed then replaced all the files under the files tab and reinstalled the IDE but I am still getting these file errors.Application_Start
Application_Active
Fname= ls-large.jpg
Error occurred on line: 101 (Main)
Error opening stream: The operation couldn’t be completed. No such file or directory
Stack Trace: (
CoreFoundation <redacted> + 150
libobjc.A.dylib objc_exception_throw + 38.........