I am wondering about embedding the CrashCatcher framework (http://code.google.com/p/plcrashreporter) in a production app. I have written some code that will upload a crash report directly to a server. And, my intent on this was to have quicker access to crash reports and not need to go through Apple/iTunes to get them.
Does anyone know whether or not embedding the CrashCatcher framework is likely to pass the application review process? And, if it does, is it likely to cause any problems or conflict with the crash catching mechanisms that Apple has built into iTunes/iTunesConnect?
Thoughts?
I corresponded with one of the authors of CrashReporter, Landon (thank you!), to provide some additional clarity on this.
Apparently, the mechanisms used by CrashReporter (signals) and Apple’s crash catching (Mach exceptions) are distinct and mutually compatible.
Right — PLCrashReporter registers standard signals handlers for the signals its interested in:
http://code.google.com/p/plcrashreporter/source/browse/trunk/Source/PLCrashSignalHandler.m#41
http://code.google.com/p/plcrashreporter/source/browse/trunk/Source/PLCrashSignalHandler.m#223
Apple makes use of a Mach exception handler to implement their crash reporting on both Mac OS X and the iPhone; mach exceptions can be handled by an exception server (either in-process or external to the process) — the default kernel-provided UNIX exception handler maps mach exceptions to UNIX signals.
The UNIX exception handler is registered here:
http://fxr.watson.org/fxr/source/bsd/kern/bsd_init.c?v=xnu-1456.1.26#L999
For crash reporting, the advantage of the Mach exception API is that you can simply pass the unmodified exceptions directly on to the next handler. I investigated implementing this early on, but the necessary API is private[1], so settled on registering standard UNIX signal handlers. If you want to read more about the Mach exception system, I’d recommend starting with Chapter 9, Section 7 of Mac OS X Internals.
Cheers,
Landon
[1] Unity 3d recently ran issues with mach exception private API via exc_server():
http://blogs.unity3d.com/2009/11/14/unity-iphone-app-store-submissions-problem-solved/