• 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: Exceptions and unexpected crashes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exceptions and unexpected crashes


  • Subject: Re: Exceptions and unexpected crashes
  • From: Chris Kane <email@hidden>
  • Date: Sun, 24 Feb 2002 13:34:23 -0800

Something corrupted one of the exception handlers for an NS_DURING, on the thread's stack. Corrupted some of the bytes near the end of the NSHandler2 structure, specifically. The exception clearing is walking through the remaining handlers on the handling stack and clearing things and runs into the corrupt memory.

The question of why there are exception handlers still on the stack is somewhat interesting. NSThread doesn't use them. If you're exiting the thread with +exit, inside an exception handled region of yours, in the thread body function say, then try moving the +exit after the exception handling. I would then expect the crash to occur during the removal of the exception handler done by NS_HANDLER. If you're exiting the thread farther down somewhere inside the code executed by the thread, then it'd be hard to say more than something has simply corrupted part of the thread call stack for a frame higher up.

Chris Kane
Cocoa Frameworks, Apple


On Monday, February 4, 2002, at 02:13 PM, Thomas Deniau wrote:

Hi !
My program crashes when it reaches the end of a threaded method, with the
following backtrace :

#0 0x70847b24 in _NSClearExceptionStack ()
#1 0x70815bf4 in -[NSThread dealloc] ()
#2 0x708115c4 in -[NSObject release] ()
#3 0x70848b88 in -[NSThread _exit] ()

The method uses a NS_DURING/NS_HANDLER/NS_ENDHANDLER construct, but I know
that there wasn't any exception raised.

What can make _NSClearExceptionStack crash ?

Thank you,

--
Thomas Deniau
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Exceptions and unexpected crashes (From: Thomas Deniau <email@hidden>)

  • Prev by Date: How to get MAC Address
  • Next by Date: complex problem
  • Previous by thread: Exceptions and unexpected crashes
  • Next by thread: focus cooties
  • Index(es):
    • Date
    • Thread