Bug? No such file when debuging

niveasoft

Member
Licensed User
Longtime User
B4i 4.81
Debuging was working fine till now.
In my project I have couple of bitmaps but today debuging stops immediately after start.
Red info says that "No such file or directory" in line :
" bmpBackground.Initialize(File.DirAssets, "main_bg.jpg") "

This file physicaly exists in the folder. I do "Sync Folder" and also "Clean Project"

What is also interresting that project can be compiled into Release App and this bitmap work fine.
I only can`t run debug anymore.

What should I check next?

EDIT: I unninstall the app from phone and then run debuging again. Everything working now fine. Sorry for the trouble.
 
Last edited:

fbritop

Active Member
Licensed User
Longtime User
Same thing arround here. It happens with 4.81 and 5.0. It cannot find files. For me it fails with the Layout loading and also with images. Also I´m pretty sure that the image layout and images exists. As stated from @niveasoft it runs perfect in Release.

Also there is a bug for the debugger not updating the code at runtime, but it has also been listed as a bug from Erel. Thats why I switched to 4.81 for the moment, but now I´m facing the problem with local files.

I have disabled any service that could be locking the files such as dropbox or any antivirus with no luck.

I also uninstall the app and try to run again with the same result

B4X:
Error loading bitmap: Error opening stream: Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory" UserInfo={_kCFStreamErrorCodeKey=2, _kCFStreamErrorDomainKey=1}
Error occurred on line: 58 (aPendingAuth)
Error opening stream: Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory" UserInfo={_kCFStreamErrorCodeKey=2, _kCFStreamErrorDomainKey=1}
Stack Trace: (
  CoreFoundation       <redacted> + 252
  libobjc.A.dylib      objc_exception_throw + 56
  CoreFoundation       <redacted> + 0
  LlaveMovil.com       -[B4IFile OpenInput::] + 436
  LlaveMovil.com       -[B4IBitmap Initialize::] + 796
  LlaveMovil.com       -[B4ICommon LoadBitmap::] + 136
  LlaveMovil.com       -[b4i_apendingauth _initpage] + 6464
  LlaveMovil.com       -[b4i_amain _pnlsubmenuoption_click] + 2840
  CoreFoundation       <redacted> + 144
  CoreFoundation       <redacted> + 284
 LlaveMovil.com       +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1624
 LlaveMovil.com       -[B4IShell runMethod:] + 448
 LlaveMovil.com       -[B4IShell raiseEventImpl:method:args::] + 1784
 LlaveMovil.com       -[B4IShellBI raiseEvent:event:params:] + 1408
 LlaveMovil.com       __33-[B4I raiseUIEvent:event:params:]_block_invoke + 60
 libdispatch.dylib    <redacted> + 24
 libdispatch.dylib    <redacted> + 16
 libdispatch.dylib    <redacted> + 1012
 CoreFoundation       <redacted> + 12
 CoreFoundation       <redacted> + 2272
 CoreFoundation       CFRunLoopRunSpecific + 552
 GraphicsServices     GSEventRunModal + 100
 UIKit                UIApplicationMain + 236
 LlaveMovil.com       main + 124
 libdyld.dylib        <redacted> + 4
)
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
The missing file issue is a known issue. If it happens you should uninstall the app, clean the project and run again. If it still happens then it is a different issue.

Also there is a bug for the debugger not updating the code at runtime, but it has also been listed as a bug from Erel
What I posted only happens in very specific case. You should keep using B4i v5.0.
 
Top