iOS Question debuging broblems

Tomas Petrus

Active Member
Licensed User
Longtime User
For some reason even I didnt do any changes in the code (I believe I didnt), the app is now named RESULT (in popup when u installing it) and now I am geting errors when accesing Fire.DirAssets.

If I comment that line I just get error somewhere else, I dont really understand some of those errors.

Maybe it has something to do that I had opened 2 projects and I run one then stop than I run the other one etc then I got to some strange behavior so I restarted iPhone and cleaned the projects.

heeelp
 

tufanv

Expert
Licensed User
Longtime User
what is the exact error ? you can try " clean project " when you are switching form one to another.
 
Upvote 0

Tomas Petrus

Active Member
Licensed User
Longtime User
B4X:
Application_Start
Error occurred on line: 138 (Main)
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
  result               -[B4IFile OpenInput::] + 436
  result               -[B4IBitmap Initialize::] + 796
  result               -[b4i_main _application_start:] + 3000
  CoreFoundation       <redacted> + 144
  CoreFoundation       <redacted> + 284
  result               +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1624
  result               -[B4IShell runMethod:] + 448
 result               -[B4IShell raiseEventImpl:method:args::] + 2164
 result               -[B4IShellBI raiseEvent:event:params:] + 1560
 result               __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
 result               main + 124
 libdyld.dylib        <redacted> + 4
)
Application_Active

line 138 is
B4X:
LogoBmp.Initialize(File.DirAssets, "icon-loading.png")

if I comment this line and the following line that use this image. the application dont crash on load but on the other Page I get another error

B4X:
Application_Start
Application_Active
Error occurred on line: 95 (AnotherDatePicker)
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
  result               -[B4IFile OpenInput::] + 436
  result               -[B4ILayoutBuilder loadLayout:::] + 652
  result               -[B4IPanelWrapper LoadLayout::] + 204
  result               -[B4XViewWrapper LoadLayout::] + 100
  result               -[ResumableSub_anotherdatepicker_DesignerCreateView resume::] + 4212
  CoreFoundation       <redacted> + 144
  CoreFoundation       <redacted> + 284
 result               +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1624
 result               -[B4IShell runMethod:] + 448
 result               -[B4IShell raiseEventImpl:method:args::] + 2164
 result               -[B4IShellBI raiseEvent:event:params:] + 1560
 result               -[B4IDelegatableResumableSub resume::] + 380
 result               __21-[B4ICommon Sleep:::]_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
 result               main + 124
 libdyld.dylib        <redacted> + 4
)

in AnotherDatePicker module
B4X:
pnlDialog.LoadLayout("DatePicker")

the layout file exist, designer see it and access it normaly...

I already cleaned many times. Without any changes in the project .. This morning I compiled it without any problem, then I start new project and then this project started to behave just strange....
 
Upvote 0

Tomas Petrus

Active Member
Licensed User
Longtime User
Make sure that there is only a single "debug compiled" application installed on the device.

This I dont understand right now I have on the device 3 different apps "debug compiled" with diferent names.
Are you telling me, that I shoud uninstall them all and have in all times just one debug compiled app?
Am I getting it right ? : )
 
Last edited:
Upvote 0

Tomas Petrus

Active Member
Licensed User
Longtime User
I tryed to install app in release mode, but it tells me that builder cannot access image in Objects\src\icon-loading.png which I use and which is there.. and in debug no problem.

help : )
 
Upvote 0

Tomas Petrus

Active Member
Licensed User
Longtime User
I did, I removed it from files manager in IDE, and added it again renamed
B4X:
    LogoBmp.Initialize(File.DirAssets, "iconloading.png")
    ImageView1.Bitmap = LogoBmp

after debug build the file iconloading.png is in Files, but application imediatelly crashes with error on "no such file or directory exist" and with unrelated line.... if i comment these 2 lines out everything works..
 
Upvote 0

Tomas Petrus

Active Member
Licensed User
Longtime User
Sadly it helped just with debug build when I try to make a release then:
B4X:
B4i Version: 5.00
Parsing code.    (0.02s)
Compiling code.    (0.09s)
Compiling layouts code.    (0.00s)
Building Xcode project    Error
Access to the path 'C:\..\..\Objects\src\iconloading.png' is denied.

so I was on the startline again...
then i checked the file for last time it was there, but as I am used to from B4A - it was Readonly.
So I assume that release build have problem with RO files.
 
Upvote 0
Top