Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: HowTo: catch a signal and get a CrashLog too (Leopard)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HowTo: catch a signal and get a CrashLog too (Leopard)



On Dec 19, 2007, at 4:38 PM, Steve Checkoway wrote:
On Dec 19, 2007, at 3:02 PM, Andre-John Mas wrote:
Is there any way for a developer to find out crashes related to their
software via Apple? It would be ideal if there was service that I could
sign up to as a developer or if MacOS X could send the log to the
the application developer, though I realise the latter might be
considered a 'security risk'.


I sort of doubt it. It's probably easiest to write your own crash handler (or modify a free one, such as the one I helped write) and handle user crashes with backtracing yourself. That way you can also include other information that is useful for tracking down bugs.

Easiest way we found was to catch the signal, open a pipe, fork a new process, reexec with a special argument so it knows to run the crash handler code, and write(2) the data to the child process. Then the child process can do things like look up symbols, make up a nice crash report and then inform the user who then has the choice to send it to you or not.

For leopard, you catch the Mach exception rather than installing a signal handler, and after you are done doing your private crash reporting stuff, you forward the exception on, it generates a signal, the process crashes, and CrashReporter grabs it from there, just like normally.


There was an example of that on this list about 3 weeks back.

-- Terry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: HowTo: catch a signal and get a CrashLog too (Leopard) (From: "James Peach" <email@hidden>)
 >Re: HowTo: catch a signal and get a CrashLog too (Leopard) (From: Andre-John Mas <email@hidden>)
 >Re: HowTo: catch a signal and get a CrashLog too (Leopard) (From: Steve Checkoway <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.