• 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: How to intercept exceptions in Carbon
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to intercept exceptions in Carbon


  • Subject: Re: How to intercept exceptions in Carbon
  • From: Steve Checkoway <email@hidden>
  • Date: Mon, 13 Aug 2007 04:18:43 -0700


On Aug 13, 2007, at 3:19 AM, Wincent Colaiuta wrote:

One of the principal obstacles to doing this is that the crash reporter daemon already takes your per-application exception handling port and as far as I know there's no way to wrest control away from it; you therefore have to rely on per-thread exception ports.

Are you sure about this? I was told to consider using mach for this when I asked on the darwin-dev list (which is probably a better place for this thread than xcode-users).


Furthermore, using signals, I have been able to catch and generate backtraces (for powerpc at least, I have no i386 so I haven't written that code yet) for almost every crash. In fact, I'm unaware of a situation where my code doesn't catch it. I have stomped the stack enough to prevent a backtrace, but I still caught it. The code is freely available, but probably too integrated with the rest of the code to easily slot in somewhere else.

Consider the alternative path:

1. When shutting down cleanly record the date/time in a plist
2. On launch compare that date with the modification date on the crash log which corresponds to your application
3. If log is more recent, display a "Application X did not shut down cleanly" window and offer to send in a report

Are you sure that the crash reporter will log it even if it's disabled? It seems better to catch it, fork a new process, write(2) some data to the new process and have that handle it.


--
Steve Checkoway



Attachment: smime.p7s
Description: S/MIME cryptographic signature

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

This email sent to email@hidden

  • Follow-Ups:
    • Re: How to intercept exceptions in Carbon
      • From: Wincent Colaiuta <email@hidden>
    • Re: How to intercept exceptions in Carbon
      • From: Dieter Oberkofler <email@hidden>
References: 
 >Re: How to intercept exceptions in Carbon (From: Greg Guerin <email@hidden>)
 >Re: How to intercept exceptions in Carbon (From: Dieter Oberkofler <email@hidden>)
 >Re: How to intercept exceptions in Carbon (From: Wincent Colaiuta <email@hidden>)

  • Prev by Date: Re: How to intercept exceptions in Carbon
  • Next by Date: Re: How to intercept exceptions in Carbon
  • Previous by thread: Re: How to intercept exceptions in Carbon
  • Next by thread: Re: How to intercept exceptions in Carbon
  • Index(es):
    • Date
    • Thread