• 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: HELP! My app crashes on startup, with a very weird stack trace.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HELP! My app crashes on startup, with a very weird stack trace.


  • Subject: Re: HELP! My app crashes on startup, with a very weird stack trace.
  • From: Michael Ash <email@hidden>
  • Date: Wed, 3 Feb 2010 00:03:02 -0500

On Tue, Feb 2, 2010 at 3:41 PM, Oleg Krupnov <email@hidden> wrote:
> Good point, Jesper.
>
> But in this case, how should I catch real unhandled exceptions and
> send bug reports? What is the recommended best practice?

As far as I know, you really can't. The problem is that what we would
generally consider to be "unhandled" exceptions actually are handled.
Cocoa contains exception handlers in certain strategic places like
NSTimer and NSNotificationCenter. These handlers catch the exception
and log an error. You've probably seen these show up, "Exception
raised during ...."

These look like an error, and should be treated as errors, but they
*are* being handled, just not well. Any code that only catches
unhandled exceptions will miss these. Any code that catches handled
exceptions will catch harmless exceptions that are being properly
caught and handled by code that expects them. And as far as I know,
there's no middle ground where you can only catch the "bad" ones.

I think about the best you can do for these is hope the user notices
that something went wrong, and have them check their Console for the
message. I think that in 10.6, these messages now include stack
traces, so that helps a great deal with debugging, but they have to
realize that there was a problem first.

Mike
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >HELP! My app crashes on startup, with a very weird stack trace. (From: Oleg Krupnov <email@hidden>)
 >Re: HELP! My app crashes on startup, with a very weird stack trace. (From: Corbin Dunn <email@hidden>)
 >Re: HELP! My app crashes on startup, with a very weird stack trace. (From: Oleg Krupnov <email@hidden>)
 >Re: HELP! My app crashes on startup, with a very weird stack trace. (From: Ken Ferry <email@hidden>)
 >Re: HELP! My app crashes on startup, with a very weird stack trace. (From: Oleg Krupnov <email@hidden>)
 >Re: HELP! My app crashes on startup, with a very weird stack trace. (From: Jesper Storm Bache <email@hidden>)
 >Re: HELP! My app crashes on startup, with a very weird stack trace. (From: Oleg Krupnov <email@hidden>)
 >Re: HELP! My app crashes on startup, with a very weird stack trace. (From: Jesper Storm Bache <email@hidden>)
 >Re: HELP! My app crashes on startup, with a very weird stack trace. (From: Oleg Krupnov <email@hidden>)

  • Prev by Date: Re: Rosetta Quandry
  • Next by Date: Re: Rosetta Quandry
  • Previous by thread: Re: HELP! My app crashes on startup, with a very weird stack trace.
  • Next by thread: Re: HELP! My app crashes on startup, with a very weird stack trace.
  • Index(es):
    • Date
    • Thread