We recently updated our deployment target from iOS 13 to iOS 14 and have no problems running on simulators. However, app would crash right after we tried to launch it and this only happens to our app running on physical devices. The crash would happen before AppDelegate's 'didFinishLaunchingWithOptions' and it happens every time we launch the app on a device.
We tried keeping everything else's, such as Pods dependencies, deployment target in iOS 13 while only having the deployment target of the app in iOS 14 but that didn't help and the crash still happened with the same stack trace. We also tried to check the Console app on Mac to see if there is any useful information but didn't find anything useful besides messages from SpringBoard such as 'application state changed to Terminated'.
I couldn't find articles that are about the same issue so I am posting it here to see if anyone has any idea what might be the causes and how to fix it. Thanks in advance and here's the stack trace:
Termination Reason: SIGNAL 11 Segmentation fault: 11
Terminating Process: exc handler [630]
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 fieldwire 0x1072455cc exchg_registrar::exchg_registrar() + 36
1 fieldwire 0x1072455cc exchg_registrar::exchg_registrar() + 36
2 dyld 0x1e53e3bdc invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 144
3 dyld 0x1e5432d08 invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 332
4 dyld 0x1e53e23d0 invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 516
5 dyld 0x1e53e1868 dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const + 280
6 dyld 0x1e53e0d7c dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 164
7 dyld 0x1e53eb94c dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 376
8 dyld 0x1e53e8758 dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 148
9 dyld 0x1e53e2100 dyld4::PrebuiltLoader::runInitializers(dyld4::RuntimeState&) const + 40
10 dyld 0x1e53e5388 dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const + 212
11 dyld 0x1e53ea0bc dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const + 176
12 dyld 0x1e5419608 dyld4::APIs::runAllInitializersForMain() + 292
13 dyld 0x1e53f2648 dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 2876
14 dyld 0x1e53f0d88 start + 1992
```.
Keep in mind that I don’t see replies if you add them as comments. See tip 5 in Quinn’s Top Ten DevForums Tips.
I am also curious if you know how to get more details about what
exchg_registrar::exchg_registrar()
is trying to do
I’m pretty sure that’s your code. Note the small offsets in the backtrace, which suggests that this is the right symbol, even though it’s not properly symbolicated.
I recommend that you use a link map to track down the origin of this code. That’s pretty obscure, so I wrote Using a Link Map to Track Down a Symbol’s Origin with the details.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"