• 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: Over-released Paragraph Style - Driving Me NUTS!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Over-released Paragraph Style - Driving Me NUTS!


  • Subject: Re: Over-released Paragraph Style - Driving Me NUTS!
  • From: "Martin" <email@hidden>
  • Date: Mon, 23 Oct 2006 18:16:16 -0700

>> Well it certainly sounded good!
>>
>> "Fear no more! Using Cocoa's NSZombie debugging class and the
>> command-line malloc_history tool, we can nail this bug in a pinch."

And it is good! Here's what to do:

1. Run your program.
2. Pause and break into gdb.
3. Enable malloc logging by entering the command: "set env MallocStackLoggingNoCompact=1"
4. Restart your program.
5. Pause again and turn on NSZombie using "set (BOOL)NSZombieEnabled=1".
6. Continue execution of your program.
7. Do the thing that causes the crash.
8. NSZombie should catch the method being sent to the deallocated object. Note the address of this object.
9. In the terminal run malloc_history to give you the list of allocations and deallocations for the address you obtained in step 8. Eg: "malloc_history <your_pid> <zombie_address>".
10. Look at the stack trace for the deallocation of the object of interest.

I hope that helps.. these are always a pain to debug,

~Martin

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

This email sent to email@hidden

  • Prev by Date: Re: Over-released Paragraph Style - Driving Me NUTS!
  • Next by Date: Re: Over-released Paragraph Style - Driving Me NUTS!
  • Previous by thread: Re: Over-released Paragraph Style - Driving Me NUTS!
  • Next by thread: Re: Over-released Paragraph Style - Driving Me NUTS!
  • Index(es):
    • Date
    • Thread