Crash report questions

I'm using the organizer window in Xcode 8.3.3 to go through crash reports. Some of the crash reports contain not a single line from our app. Ex. one crash contains nothing but lines from dyld:


Thread 0 Crashed:
0   dyld 0x00000001001d69dc __fcntl + 8
1   dyld 0x00000001001d62e8 _fcntl + 84 (fcntl-base.c:79)
2   dyld 0x00000001001c4c84 ImageLoaderMachO::loadCodeSignature(linkedit_data_command const*, int, unsigned long long, ImageLoader::LinkContext const&) + 68 (ImageLoaderMachO.cpp:1137)
3   dyld 0x00000001001c7ca8 ImageLoaderMachOCompressed::instantiateFromFile(char const*, int, unsigned char const*, unsigned long, unsigned long long, unsigned long long, stat const&, unsigned int, unsigned int, linkedit_data_command const*, encryption_info_command const*, ImageLoader::LinkContext const&) + 224 (ImageLoaderMachOCompressed.cpp:112)
4   dyld 0x00000001001c3c8c ImageLoaderMachO::instantiateFromFile(char const*, int, unsigned char const*, unsigned long, unsigned long long, unsigned long long, stat const&, ImageLoader::LinkContext const&) + 164 (ImageLoaderMachO.cpp:583)
5   dyld 0x00000001001b3bf0 dyld::loadPhase6(int, stat const&, char const*, dyld::LoadContext const&) + 492 (dyld.cpp:3081)
6   dyld 0x00000001001b8a1c dyld::loadPhase5stat(char const*, dyld::LoadContext const&, stat*, int*, bool*, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 208 (dyld.cpp:3126)
7   dyld 0x00000001001b8850 dyld::loadPhase5(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 704 (dyld.cpp:3265)
8   dyld 0x00000001001b8554 dyld::loadPhase4(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 204 (dyld.cpp:3361)
9   dyld 0x00000001001b7f10 dyld::loadPhase3(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 344 (dyld.cpp:3454)
10  dyld 0x00000001001b37a0 dyld::loadPhase0(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 176 (dyld.cpp:3574)
11  dyld 0x00000001001b3484 dyld::load(char const*, dyld::LoadContext const&, unsigned int&) + 180 (dyld.cpp:3662)
12  dyld 0x00000001001b905c dyld::libraryLocator(char const*, bool, char const*, ImageLoader::RPathChain const*, unsigned int&) + 56 (dyld.cpp:4941)
13  dyld 0x00000001001c0f44 ImageLoader::recursiveLoadLibraries(ImageLoader::LinkContext const&, bool, ImageLoader::RPathChain const&, char const*) + 320 (ImageLoader.cpp:642)
14  dyld 0x00000001001c034c ImageLoader::link(ImageLoader::LinkContext const&, bool, bool, bool, ImageLoader::RPathChain const&, char const*) + 124 (ImageLoader.cpp:431)
15  dyld 0x00000001001b5214 dyld::link(ImageLoader*, bool, bool, ImageLoader::RPathChain const&, unsigned int) + 228 (dyld.cpp:5179)
16  dyld 0x00000001001b6274 dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 2544 (dyld.cpp:6058)
17  dyld 0x00000001001b1044 _dyld_start + 68


What are we supposed to do with crash logs having none of our code?


Thanks

Mike

Replies

Please post the entire crash log.


A crash like this for an App Store app typically means your app took too long to launch - it never reached any of your app's code. This can be due to having too many frameworks, as this code is part of the process of loading the frameworks. Having the full crash log will provide more insight.

Thanks for the help... This is all I can see in the crashes window in Xcode. I found the item in the fider and dug into the package contents to get one of the embedded crash logs and this is what it shows...


Incident Identifier: 4FCC9AC6-FB36-4368-B309-06F7BBC8B28F
CrashReporter Key:   61fc32af988b4b4dbfce7ba88c3ab6e90b166228
Hardware Model:      iPad6,4
Process:             MyApp Keyboard [7594]
Path:                /private/var/containers/Bundle/Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/MyApp.app/PlugIns/MyApp Keyboard.appex/MyApp Keyboard
Identifier:          com.mydomain.myapp.MyApp-Keyboard
Version:             242 (3.5)
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           com.mydomain.myapp.MyApp-Keyboard [2316]




Date/Time:           2017-09-09 16:54:45.8562 -0500
Launch Time:         2017-09-09 16:54:45.8004 -0500
OS Version:          iPhone OS 10.3.3 (14G60)
Report Version:      104


Exception Type:  EXC_CRASH (SIGQUIT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Termination Signal: Quit: 3
Termination Reason: Namespace SIGNAL, Code 0x3
Terminating Process: launchd [1]
Triggered by Thread:  0


Thread 0 Crashed:
0   dyld                           0x00000001001d69dc __fcntl + 8
1   dyld                           0x00000001001d62e8 _fcntl + 84 (fcntl-base.c:79)
2   dyld                           0x00000001001c4c84 ImageLoaderMachO::loadCodeSignature(linkedit_data_command const*, int, unsigned long long, ImageLoader::LinkContext const&) + 68 (ImageLoaderMachO.cpp:1137)
3   dyld                           0x00000001001c7ca8 ImageLoaderMachOCompressed::instantiateFromFile(char const*, int, unsigned char const*, unsigned long, unsigned long long, unsigned long long, stat const&, unsigned int, unsigned int, linkedit_data_command const*, encryption_info_command const*, ImageLoader::LinkContext const&) + 224 (ImageLoaderMachOCompressed.cpp:112)
4   dyld                           0x00000001001c3c8c ImageLoaderMachO::instantiateFromFile(char const*, int, unsigned char const*, unsigned long, unsigned long long, unsigned long long, stat const&, ImageLoader::LinkContext const&) + 164 (ImageLoaderMachO.cpp:583)
5   dyld                           0x00000001001b3bf0 dyld::loadPhase6(int, stat const&, char const*, dyld::LoadContext const&) + 492 (dyld.cpp:3081)
6   dyld                           0x00000001001b8a1c dyld::loadPhase5stat(char const*, dyld::LoadContext const&, stat*, int*, bool*, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 208 (dyld.cpp:3126)
7   dyld                           0x00000001001b8850 dyld::loadPhase5(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 704 (dyld.cpp:3265)
8   dyld                           0x00000001001b8554 dyld::loadPhase4(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 204 (dyld.cpp:3361)
9   dyld                           0x00000001001b7f10 dyld::loadPhase3(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 344 (dyld.cpp:3454)
10  dyld                           0x00000001001b37a0 dyld::loadPhase0(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 176 (dyld.cpp:3574)
11  dyld                           0x00000001001b3484 dyld::load(char const*, dyld::LoadContext const&, unsigned int&) + 180 (dyld.cpp:3662)
12  dyld                           0x00000001001b905c dyld::libraryLocator(char const*, bool, char const*, ImageLoader::RPathChain const*, unsigned int&) + 56 (dyld.cpp:4941)
13  dyld                           0x00000001001c0f44 ImageLoader::recursiveLoadLibraries(ImageLoader::LinkContext const&, bool, ImageLoader::RPathChain const&, char const*) + 320 (ImageLoader.cpp:642)
14  dyld                           0x00000001001c034c ImageLoader::link(ImageLoader::LinkContext const&, bool, bool, bool, ImageLoader::RPathChain const&, char const*) + 124 (ImageLoader.cpp:431)
15  dyld                           0x00000001001b5214 dyld::link(ImageLoader*, bool, bool, ImageLoader::RPathChain const&, unsigned int) + 228 (dyld.cpp:5179)
16  dyld                           0x00000001001b6274 dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 2544 (dyld.cpp:6058)
17  dyld                           0x00000001001b1044 _dyld_start + 68


Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000001   x1: 0x0000000000000000   x2: 0x000000016fda5868   x3: 0x0000000000000000
    x4: 0x00000001001e5848   x5: 0x000000000000000a   x6: 0x000000016fdadf30   x7: 0x0000000000000003
    x8: 0x000000016fda5850   x9: 0x000000016fda5858  x10: 0x000000016fda6a78  x11: 0x0000000000000010
   x12: 0x000000000001c618  x13: 0x00000000000000dc  x14: 0x000000016fda6648  x15: 0x0000000000000018
   x16: 0x000000000000005c  x17: 0x0000000080000018  x18: 0x0000000000000000  x19: 0x00000001001ec430
   x20: 0x00000001001e5848  x21: 0x0000000000000000  x22: 0x00000001001e5848  x23: 0x000000016fdae090
   x24: 0x00000001001ec4b0  x25: 0x000000016fdadf30  x26: 0x0000000000000003  x27: 0x000000016fda5e18
   x28: 0x0000000000000000   fp: 0x000000016fda5840   lr: 0x00000001001d62e8
    sp: 0x000000016fda5830   pc: 0x00000001001d69dc cpsr: 0xa0000000


Binary Images:
0x100050000 - 0x1000a7fff MyApp Keyboard arm64  <9a32a8cd7cd53fb281529160096f5ac2> /var/containers/Bundle/Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/MyApp.app/PlugIns/MyApp Keyboard.appex/MyApp Keyboard
0x1001b0000 - 0x1001e3fff dyld arm64  <93b6f8d0b0c03d8695fbd178c57cb071> /usr/lib/dyld
0x100238000 - 0x1002b7fff MyAppDataKit arm64  <644fc66396ec36529c7ac62770767aed> /var/containers/Bundle/Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/MyApp.app/Frameworks/MyAppDataKit.framework/MyAppDataKit
0x100340000 - 0x1003fffff AWSCore arm64  <4d3674bea8ef370eb4e2e7ba454f0258> /var/containers/Bundle/Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/MyApp.app/Frameworks/AWSCore.framework/AWSCore
0x1004e0000 - 0x100557fff MyAppCommonKit arm64  <5272277661763d1789ca718be867ad5e> /var/containers/Bundle/Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/MyApp.app/Frameworks/MyAppCommonKit.framework/MyAppCommonKit
0x1005a4000 - 0x10060bfff MyAppUIKit arm64  <ca8d169f349a302e83866c4c4dd32b2f> /var/containers/Bundle/Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/MyApp.app/Frameworks/MyAppUIKit.framework/MyAppUIKit
0x10069c000 - 0x1008e3fff libswiftCore.dylib arm64  <900e59d21c9f3a439d3ae552a289103f> /var/containers/Bundle/Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/MyApp.app/Frameworks/libswiftCore.dylib


EOF


BTW this is from an app keyboard extension. I'm not sure that makes a difference here. Thanks again, Mike

I see you have 5 frameworks in the Binary Images section, so my original assessment about taking too much time to load those frameworks remains a possibility. You may be interested in the WWDC talk about dyld, which includes a demo of some tools in Instruments you can use to see where your start up time is going.

I watched through the wwdc link and one other one from 2016 that was referenced in that talk. Much of the content wasn't relevant because I'm already using Swift. I used the static initializer and the app time profiler. Cold start of the keyboard extension on iOS 11 iPhone 6 is 599ms, 198ms of which was _dlyd_start. On the iPhone 5 which has iOS 10.3.3 it took 680ms with dyldbootstrap::start taking 193ms, again from a cold start. I realize this is more than the 400ms that they say is the goal but it's still less than a second.

However! This is after refactoring code for the update to Swift 4 and Xcode 9 so at this point it may be an exercise in which we learn nothing. Thanks for the link to the talk on startup time and the tools I can use to keep an eye on things. I can already see some places where we can improve.


Thanks,

Mike

How were you able to solve the issue ?