I use crashlytics to get the crashes of my app that is in the AppStore. Some users are getting a crash that I cannot seem to repro on my machine (neither the few friends that tested my app through TestFlight). This is the logs from Fabric:
Thread : Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x181d09bdc objc_msgSend + 28
1 Foundation 0x18304be20 __NSThreadPerformPerform + 340
2 CoreFoundation 0x182640efc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
3 CoreFoundation 0x182640990 __CFRunLoopDoSources0 + 540
4 CoreFoundation 0x18263e690 __CFRunLoopRun + 724
5 CoreFoundation 0x18256d680 CFRunLoopRunSpecific + 384
6 GraphicsServices 0x183a7c088 GSEventRunModal + 180
7 UIKit 0x1873e4d90 UIApplicationMain + 204
8 <App Name> 0x1000b2f0c main (AppDelegate.swift:14)
9 libdispatch.dylib 0x18210e8b8 (Missing)
I can't seem to understand what this means and searched other questions for help but can't seem to find an answer. I also quickly contacted the Crashlytics team, and they told me the following:
It sounds like the source of this crash is some sort of out of memory crash. This causing Crashlytics to close before it finishes writing, resulting in this in your crash report.
Any nice ways to debug this in order to pinpoint the source of the crash? Appreciate the help!
EDIT: Added screenshot of Threads in the crash report from crashlytics in case someone wants some info from there:
Thread : com.apple.NSURLConnectionLoader
0 libsystem_kernel.dylib 0x1823354bc mach_msg_trap + 8
1 libsystem_kernel.dylib 0x182335338 mach_msg + 72
2 CoreFoundation 0x182764ac0 __CFRunLoopServiceMachPort + 196
3 CoreFoundation 0x1827627c4 __CFRunLoopRun + 1032
4 CoreFoundation 0x182691680 CFRunLoopRunSpecific + 384
5 CFNetwork 0x182e01434 +[NSURLConnection(Loader) _resourceLoadLoop:] + 412
6 Foundation 0x18316fc40 __NSThread__start__ + 1000
7 libsystem_pthread.dylib 0x182417b28 _pthread_body + 156
8 libsystem_pthread.dylib 0x182417a8c _pthread_body + 154
9 libsystem_pthread.dylib 0x182415028 thread_start + 4
Thread : AVAudioSession Notify Thread
0 libsystem_kernel.dylib 0x1823354bc mach_msg_trap + 8
1 libsystem_kernel.dylib 0x182335338 mach_msg + 72
2 CoreFoundation 0x182764ac0 __CFRunLoopServiceMachPort + 196
3 CoreFoundation 0x1827627c4 __CFRunLoopRun + 1032
4 CoreFoundation 0x182691680 CFRunLoopRunSpecific + 384
5 libAVFAudio.dylib 0x188959834 GenericRunLoopThread::Entry(void*) + 164
6 libAVFAudio.dylib 0x18892e3a8 CAPThread::Entry(CAPThread*) + 84
7 libsystem_pthread.dylib 0x182417b28 _pthread_body + 156
8 libsystem_pthread.dylib 0x182417a8c _pthread_body + 154
9 libsystem_pthread.dylib 0x182415028 thread_start + 4
EDIT 2: I am using all Swift code, and the way I am forwarding a messages to Selectors is the following:
NSTimer.scheduledTimerWithTimeInterval(0.02, target: self, selector: Selector("updateProgressCircle"), userInfo: nil, repeats: true)
func updateProgressCircle() {
// Do something
}
Problem is that I can't repro any crash from this locally. Only users are facing that. I call selectors in a similar fashion.