Bug? Missing AppIcon29x29~ipad.png causes crash in Release Mode

b4x-de

Active Member
Licensed User
Longtime User
Hi,

I’m facing a crash of my app Release mode. In Debug mode everything works fine. The release logger reports:

B4X:
AppIcon29x29~ipad.png
Error getting attributes: Error Domain=NSCocoaErrorDomain Code=260 "The file ?ap
picon29x29~ipad.png? couldn?t be opened because there is no such file." UserInfo
={NSFilePath=/private/var/containers/Bundle/Application/56EE36B6-5514-45AD-80DD-
CB102F28BDBB/B4i Example.app/appicon29x29~ipad.png, NSUnderlyingError=0x281ac523
0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
Stack Trace: (
CoreFoundation F80FCA31-BF76-3293-8BC6-1729588AE8B6 + 1155368
libobjc.A.dylib objc_exception_throw + 56
CoreFoundation F80FCA31-BF76-3293-8BC6-1729588AE8B6 + 119500
B4i Example -[B4IFile GetAttributes::] + 412
B4i Example -[B4IFile IsDirectory::] + 104

This is a standard B4i project (not a B4x pages project). The relevant B4i code snipped is:

B4X:
Private Sub Application_Start (Nav As NavigationController)
    NavControl = Nav
    Page1.Initialize("Page1")
    Page1.RootPanel.LoadLayout("Page1")
    NavControl.ShowPage(Page1)
    
    Dim rl As ReleaseLogger
    rl.Initialize("192.168.0.2", 54323)
    
    Log(getFilenames)
End Sub

Private Sub getFilenames() As String
    Dim lstFilesAndDirs As List
    Dim strFileOrDir As String
    Dim strFilesFoo As String
    
    lstFilesAndDirs = File.ListFiles(File.DirAssets)
    
    strFilesFoo = ""
    
    For i = 0 To lstFilesAndDirs.Size-1
        strFileOrDir = lstFilesAndDirs.Get(i)
        Log(strFileOrDir)
        
        If Not(File.IsDirectory(File.DirAssets, strFileOrDir)) Then
            If strFileOrDir.EndsWith(".foo") Then
                strFilesFoo = strFilesFoo & File.Combine(File.DirAssets, strFileOrDir)
            End If
        End If
    Next
    
    Return strFilesFoo
End Sub

An example to reproduce this error is provided as attachment. Am I doing something wrong or is the missing AppIcon29x29~ipad.png a bug in B4i?

Thanks,
Thomas
 

Attachments

  • ListFilesErr.zip
    2.7 KB · Views: 230
Cookies are required to use this site. You must accept them to continue using the site. Learn more…