Hi!
The following code causes the app to crash. The Filenames are all correct. The file was created in the same app and used WriteB4xObject(0) which appears to work. the DefaultDirectory is 'File.DirLibrary'.
Using Try/Catch/End Try does not catch the error. The same code works in the Android version of the app without error.
I am using the current version of B4i, and a real device using hosted builder.
Any thoughts as to why I can't catch the error, and what might be causing it?
Dim unlck_raf As RandomAccessFile
unlck_raf.initialize(DefaultFileDirectory, locked_LCK_filename, False)
Log("Initialised raf")
Dim unpack_lck_map As Map
unpack_lck_map.Initialize
Log("unpack map")
If unlck_raf.Size <> 0 Then
unpack_lck_map = unlck_raf.ReadB4XObject(0)
End If
The line that causes the crash is line 8 highlighted above.
Values at the breakpoint on that line are: