After the app is put in background for sometime and brought in to foreground and the app crashes each time with a different thread stack entries but all of them states same exception reason.
Looking at your first crash report, I see this:
Last Exception Backtrace: 0 CoreFoundation … __exceptionPreprocess + 164 (NSException.m:249) 1 libobjc.A.dylib … objc_exception_throw + 88 (objc-exception.mm:356) 2 CoreFoundation … __NSFastEnumerationMutationHandler + 116 (NSEnumerator.m:132) 3 Foundation … -[NSConcreteHashTable countByEnumeratingWithState:objects:count:] + 124 (NSHashTable.m:579) 4 MyIphoneApp … cli_signalHandler + 2452 …
This suggests a serious problem in your code. Frame 4 indicates that you’re handling a ******, and frame 3 shows that your ****** handler is calling Objective-C. That’s not allowed. ****** handlers are restricted to using a tiny set of system routines, as documented in the sigaction
man page.
Is this ****** handler part of a crash reporter? If so, my advice is that you remove it. It’s crashing, which prevents the Apple crash reporter from doing its job. I discuss this issue in detail in Implementing Your Own Crash Reporter.
If this ****** handler isn’t part of a crash reporter, please reply back with more info about what it’s supposed to do. ****** handlers are tricky to get right, and only useful in a very limited set of circumstances.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"