• 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 do I debug an autorelease crash?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I debug an autorelease crash?


  • Subject: Re: How do I debug an autorelease crash?
  • From: Dave Keck <email@hidden>
  • Date: Sat, 13 Sep 2003 12:05:50 -0400

What exactly causes this crash anyway? Have I manually released an autoreleased object? It seems like it would be more useful to get a signal raised at the time of the error rather than at the end of the run loop.

Dave

My guess is you're not retaining it at one point or another, so it gets released. Later on in your code you try to access it, but it's already been released, so you're trying to access a nonexistent variable, and so it gets mad. To make sure this is the problem, one thing you could do is retain it a bunch at one point after being autoreleased, and see if your application still crashes. If it doesn't, you should remove the "bunch of retains" and then track down where you should be retaining it to avoid it being released until it's no longer needed. If it still crashes, well... I guess I was wrong. Sorry :-(

- - -

Dave Keck
If I were smart I'd own a company to tell you the the name of.
"Contrariwise," continued Tweedledee, "if it was so, it might be; and if it were so, it would be; but as it isn't, it ain't. That's logic."
_______________________________________________
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: 
 >How do I debug an autorelease crash? (From: Dave Riggle <email@hidden>)

  • Prev by Date: Re: Extracting info from notification
  • Next by Date: Another autorelease question
  • Previous by thread: How do I debug an autorelease crash?
  • Next by thread: Re: How do I debug an autorelease crash?
  • Index(es):
    • Date
    • Thread