Re: Debugger calling string methods on a window
Re: Debugger calling string methods on a window
- Subject: Re: Debugger calling string methods on a window
- From: Mike Ferris <email@hidden>
- Date: Sun, 20 Jun 2004 12:08:07 -0700
Always remember the most common answer to the question "Why the hell is
someone send an NSString method to a <WhateverClass> instance?"
The most common answer is that your WhateverClass instance (an NSWindow
in this case) is at the same memory location that used to hold an
NSString which was deallocated, but someone else still has a dangling
pointer to the string and is trying to send it string messages.
These kinds of bugs are tricky (like many memory-related bugs) since
you only hear about it (potentially a long time) after it actually went
wrong. Try breaking on main() and setting NSZombieEnabled to YES
before continuing. See NSDebug.h for more details, but zombies can be
a big help tracking down dangling pointers...
Mike
_______________________________________________
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.