iOS Question BCTextEngine Emoji error

fbritop

Active Member
Licensed User
Longtime User
Today, dont now why I started having trouble when I run a project with the following error:

Error reading file: Error Domain=NSCocoaErrorDomain Code=260 "The file “emoji-data.txt” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/private/var/mobile/Containers/Data/Application/6465D7EF-C239-4267-AC07-2F955877BBEC/tmp/virtual_assets/emoji-data.txt, NSUnderlyingError=0x280d24510 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}

I cannot debug it as the problem occurs inside BCTextEngine (line 1171). What can this be?
It does not happen on Release Mode

It seems the problem is with files. For example this is my file manager tab

The file is also in the dir "Files".


When I execute the following, it logs FALSE, and loadBitmap crashes, but I dont know why if the file is in the assets folder.

B4X:
    Log(File.Exists(File.DirAssets, "ELOCK.btn.png"))
    Dim bmTemp As Bitmap=LoadBitmap(File.DirAssets, "ELOCK.btn.png")

Crash Logs:

B4X:
Error reading file: Error Domain=NSCocoaErrorDomain Code=260 "The file “emoji-data.txt” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/private/var/mobile/Containers/Data/Application/9AFD6BD4-7D3E-4290-AA79-53678AFA1B06/tmp/virtual_assets/emoji-data.txt, NSUnderlyingError=0x282344900 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
Stack Trace: (
  CoreFoundation       <redacted> + 252
  libobjc.A.dylib      objc_exception_throw + 56
  CoreFoundation       <redacted> + 0
  LlaveMovil.com       -[B4IFile ReadString2:::] + 420
  LlaveMovil.com       -[B4IFile ReadString::] + 108
  LlaveMovil.com       -[B4IFile ReadList::] + 100
  LlaveMovil.com       -[b4i_bctextengine _loaddata:::] + 776
  LlaveMovil.com       -[b4i_bctextengine _createglyph::::] + 5116
  LlaveMovil.com       -[b4i_bctextengine _createglyphfromdefaultcolor::::] + 696
  LlaveMovil.com       -[b4i_bctextengine _createglyph::::] + 848
 LlaveMovil.com       -[b4i_bctextengine _createsinglesection::::] + 1308
 LlaveMovil.com       -[b4i_bctextengine _createunbreakable::::::] + 1012
 LlaveMovil.com       -[b4i_bctextengine _handletextrun::::] + 2188
 LlaveMovil.com       -[b4i_bctextengine _prepare:::] + 1292
 LlaveMovil.com       -[b4i_bctextengine _drawtext:::::] + 708
 LlaveMovil.com       -[b4i_bblabel _redraw:] + 1048
 LlaveMovil.com       -[b4i_bblabel _parseanddraw:] + 1260
 LlaveMovil.com       -[b4i_bblabel _settext::] + 488
 LlaveMovil.com       -[b4i_clsbblabel _generate::] + 2196
 LlaveMovil.com       -[ResumableSub_b4xmainpage_B4XPage_Created resume::] + 22196
 CoreFoundation       <redacted> + 144
 CoreFoundation       <redacted> + 292
 LlaveMovil.com       +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1300
 LlaveMovil.com       -[B4IShell runMethod:] + 448
 LlaveMovil.com       -[B4IShell raiseEventImpl:method:args::] + 2172
 LlaveMovil.com       -[B4IShellBI raiseEvent:event:params:] + 1580
 LlaveMovil.com       -[B4IDelegatableResumableSub resume::] + 380
 LlaveMovil.com       __21-[B4ICommon Sleep:::]_block_invoke + 48
 libdispatch.dylib    <redacted> + 16
 libdispatch.dylib    <redacted> + 412
 libdispatch.dylib    <redacted> + 1308
 libdispatch.dylib    <redacted> + 784
 CoreFoundation       <redacted> + 12
 CoreFoundation       <redacted> + 1924
 CoreFoundation       CFRunLoopRunSpecific + 436
 GraphicsServices     GSEventRunModal + 104
 UIKitCore            UIApplicationMain + 212
 LlaveMovil.com       main + 104
 libdyld.dylib        <redacted> + 4
 
Last edited:

fbritop

Active Member
Licensed User
Longtime User
Thanks
That was my last action yesterday and it did the job. Still cannot understand why it starts getting corrupted files. Anyway thanks
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…