With the release of iOS 9, we are seeing several crash reports for what appears to be a bug from Apple\'s side of things in iOS 9. This is happening across device types (iPh
I'm also facing this issue and I think that I found what might be causing it. Are you guys by any chance using SDWebImage? Because that's the only place where I found that CFRunLoopRun() is being called and also other people complained on: Dead thread ticket -> App Crash
We encountered the a crash with a similar stack trace, and after a long investigation we found out that it was related to an other crash; fixing that also fixed this, however I'm still unsure how the two crashes are related.
Here are the details about the other crash:
We had a function call in one of our methods like
AudioServicesAddSystemSoundCompletion(self.soundID,
[[NSRunLoop currentRunLoop] getCFRunLoop],
kCFRunLoopDefaultMode,
AudioServicesSystemSoundCompletion,
(void *)CFBridgingRetain(self));
where AudioServicesSystemSoundCompletion looked like
void AudioServicesSystemSoundCompletion(SystemSoundID ssID, void *clientData) {
AudioServicesRemoveSystemSoundCompletion(ssID);
CFRelease(clientData);
}
Executing that function call two or more times simultaneously caused the app to crash. We fixed this by passing NULL instead of (void *)CFBridgingRetain(self) and removing the CFRelease(clientData); line.
Since this fix we no longer see the '_prepareForCAFlush' crash anymore.
Also note that according to Crashlytics the device had very high memory usage each time the crash has reproduced.
Hope this helps!
For me the problem was that I was showing and dismissing the keyboard when the application was minimized.
[self.textView becomeFirstResponder];
[self.textView resignFirstResponder];
I performed the above code on the applicationWillResignActive event. removing this code fixed the crash.
Seems to be only affecting devices with 32-bit processors A5 and A6 - iPod 5th Gen, iPhone 4S/5/5C, iPad 2/Mini). No repro on our side either. These crashes started and ramped up with iOS 9 release and adoption. iOS v9.0.1 does not seem to fix it.