• 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: Trying to understand the cause of a "message sent to deallocated instance" error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trying to understand the cause of a "message sent to deallocated instance" error


  • Subject: Re: Trying to understand the cause of a "message sent to deallocated instance" error
  • From: Michael Ash <email@hidden>
  • Date: Sat, 7 Mar 2009 23:37:14 -0500

On Sat, Mar 7, 2009 at 4:24 PM, Matt Crocker <email@hidden> wrote:
> Folks,
>
> I have recently expanded the functionality of my app, and in the process I
> have caused an error to occur when the app's document window is closed or
> the app is quit. The error is triggered when i call [super dealloc], and the
> log reports:
>
> *** -[MyDocument respondsToSelector:]: message sent to deallocated instance
> 0x15b9d0
>
> My problem is that I don't know how to work out which part of MyDocument is
> causing the error (0x15b9d0 is the address if MyDocument), probably due to a
> lack of experience.
>
> Can anyone give me any pointers of how to proceed? I've tried a few obvious
> things such as removing the "release" commands in the dealloc method, and am
> loathed to start removing big chunks of code elsewhere to see what
> happens...

You'll want to read through this:

http://www.cocoadev.com/index.pl?DebuggingTechniques

Pay particular attention to the bits on breaking on exceptions, and
NSZombieEnabled.

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: 
 >Trying to understand the cause of a "message sent to deallocated instance" error (From: Matt Crocker <email@hidden>)

  • Prev by Date: Re: NSString to Integer
  • Next by Date: Re: Cleaner daemon managed by Launchd?
  • Previous by thread: Re: Trying to understand the cause of a "message sent to deallocated instance" error
  • Next by thread: Cleaner daemon managed by Launchd?
  • Index(es):
    • Date
    • Thread