Ad-Hoc ipa launch crash issue

Running on the simulator & real machine will not crash, uploading Testflight installation will not crash, only Ad-hoc crash

CrashReporter Key:   853c4fc40b6de72d451a39a413a14107a39a33d8
Hardware Model:      iPhone13,4
Process:             Kasta [11064]
Path:                /private/var/containers/Bundle/Application/488D3FA6-DAB2-47BD-9C76-F41FC9A2894C/Kasta.app/Kasta
Identifier:          Kasta.xxxxxx.xxxxxx
Version:             2.6.059 (1311)
AppStoreTools:       13E113
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           Kasta.xxxxxx.xxxxxx [1653]

Date/Time:           2022-04-02 14:20:34.5538 +0800
Launch Time:         2022-04-02 14:20:34.5177 +0800
OS Version:          iPhone OS 15.3.1 (19D52)
Release Type:        User
Baseband Version:    2.23.02
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Triggered by Thread:  0

Application Specific Information:
abort() called


Thread 0 name:   Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib        	       0x1b853f964 __pthread_kill + 8
1   libsystem_pthread.dylib       	       0x1f21fd378 pthread_kill + 268
2   libsystem_c.dylib             	       0x18bd48f50 abort + 164
3   libswiftCore.dylib            	       0x1086f4028 swift::fatalError(unsigned int, char const*, ...) + 56
4   libswiftCore.dylib            	       0x1086ec1c8 checkVersion() + 60
5   dyld                          	       0x1079f4794 invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 164
6   dyld                          	       0x107a28510 invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 168
7   dyld                          	       0x1079f2428 invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 532
8   dyld                          	       0x1079f1678 dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const + 168
9   dyld                          	       0x1079f09d0 dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 192
10  dyld                          	       0x107a28098 dyld3::MachOAnalyzer::forEachInitializerPointerSection(Diagnostics&, void (unsigned int, unsigned int, unsigned char const*, bool&) block_pointer) const + 148
11  dyld                          	       0x1079fddc0 dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 432
12  dyld                          	       0x1079fa968 dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 172
13  dyld                          	       0x1079f2144 dyld4::PrebuiltLoader::runInitializers(dyld4::RuntimeState&) const + 44
14  dyld                          	       0x1079f6344 dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const + 208
15  dyld                          	       0x1079f6320 dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const + 172
16  dyld                          	       0x1079fc4b0 dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const + 124
17  dyld                          	       0x107a1c124 dyld4::APIs::runAllInitializersForMain() + 320
18  dyld                          	       0x107a07508 dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 3024
19  dyld                          	       0x107a05a84 start + 488


Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
    x4: 0x00000000005069d0   x5: 0x0000000000000010   x6: 0x0049000004210143   x7: 0x000000000000003e
    x8: 0x6315f34501847698   x9: 0x6315f3440621f318  x10: 0x0000000000000000  x11: 0x0000000000000002
   x12: 0x00000000aec51855  x13: 0x000000002ec51800  x14: 0x000000002ec00000  x15: 0x0000000000000007
   x16: 0x0000000000000148  x17: 0x0000000107a58580  x18: 0x0000000000000000  x19: 0x0000000000000006
   x20: 0x0000000000000103  x21: 0x0000000107a58660  x22: 0x00000001087906f0  x23: 0x0000000108470710
   x24: 0x0000000108470830  x25: 0x000000016b606210  x26: 0x0000000108470dd0  x27: 0x00000000000013a0
   x28: 0x0000000107a986f0   fp: 0x000000016b605f20   lr: 0x00000001f21fd378
    sp: 0x000000016b605f00   pc: 0x00000001b853f964 cpsr: 0x40001000
   far: 0x00000001d7c71e50  esr: 0x56000080  Address size fault

Binary Images:
       0x1b8538000 -        0x1b856bfff libsystem_kernel.dylib arm64e  <ff3ee512a0bc3123b983d365a71fb06a> /usr/lib/system/libsystem_kernel.dylib
       0x1f21f6000 -        0x1f2201fff libsystem_pthread.dylib arm64e  <a17d07cfe86a392387c4921045898a8a> /usr/lib/system/libsystem_pthread.dylib
       0x18bd29000 -        0x18bda7fff libsystem_c.dylib arm64e  <9b299ee5b3793856848b524d82640dbc> /usr/lib/system/libsystem_c.dylib
       0x108470000 -        0x10878ffff libswiftCore.dylib arm64  <ad0cad3b1b51332786448be1ff1f0ae9> /private/var/containers/Bundle/Application/488D3FA6-DAB2-47BD-9C76-F41FC9A2894C/Kasta.app/Frameworks/libswiftCore.dylib
       0x1079ec000 -        0x107a43fff dyld arm64e  <780553c7d39f322a8cb9f4f6de52610d> /usr/lib/dyld

EOF

Can you reproduce this locally?

If so, it’s likely that there’s a message associated with the fatalError call on frame 3. Do you see that in the system log?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

That message Quinn refers to will tell you that this Swift library shouldn't be embedded, because Swift is included with iOS since iOS 12.2:

OS Version:          iPhone OS 15.3.1 (19D52)
<snip>
4   libswiftCore.dylib            	       0x1086ec1c8 checkVersion() + 60

This path in the Binary Images section should point to something in a system directory, not your app:

       0x108470000 -        0x10878ffff libswiftCore.dylib arm64  <ad0cad3b1b51332786448be1ff1f0ae9> /private/var/containers/Bundle/Application/488D3FA6-DAB2-47BD-9C76-F41FC9A2894C/Kasta.app/Frameworks/libswiftCore.dylib

One way this can happen is with overridden @rpath entries in the LD_RUNPATH_SEARCH_PATHS build setting. If you've overridden this setting, remove your override.

However, there's something odd here in your export or the info you provided. You say:

uploading Testflight installation will not crash, only Ad-hoc crash

But your crash report is from the App Store:

AppStoreTools:       13E113

Which statement is correct? How did you export the app for Ad-Hoc?

Ad-Hoc ipa launch crash issue
 
 
Q