• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
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)


  • Subject: Re: HowTo: catch a signal and get a CrashLog too (Leopard)
  • From: Terry Lambert <email@hidden>
  • Date: Wed, 19 Dec 2007 19:40:47 -0800

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>)

  • Prev by Date: Re: Closing an IOUserClient
  • Next by Date: Re: How does 'Finder' open an application and bring the window to the front?
  • Previous by thread: Re: HowTo: catch a signal and get a CrashLog too (Leopard)
  • Next by thread: Closing an IOUserClient
  • Index(es):
    • Date
    • Thread