Re: SIGBUS 10 in Autorelease Pool
Re: SIGBUS 10 in Autorelease Pool
- Subject: Re: SIGBUS 10 in Autorelease Pool
- From: j o a r <email@hidden>
- Date: Tue, 22 Apr 2003 18:16:51 +0200
On Tuesday, Apr 22, 2003, at 17:56 Europe/Stockholm, Marc Weil wrote:
It seems to be something with variables of mine being autoreleased by
the
runtime. The only thing I can think of is that, somewhere, an object is
being autoreleased, and then released, causing the pointer in the
autorelease pool to be invalid. But I can't think of anything else,
and I
can't find where this is occurring in my code.
I would bet that you are releasing an autoreleased object.
Could anyone provide me with some assistance?
If you cannot find this by inspection, you can use zombie objects (see
list archives, documentation, etc.):
In your main.m:
#import <Foundation/NSDebug.h>
NSZombieEnabled = YES;
(You don't have to add it in code, you can also set it in GDB, but I
forgot the proper syntax...)
Then add breakpoints for:
(gdb) break -[_NSZombie release]
(gdb) break -[_NSZombie methodSignatureForSelector:]
Now you willl break on each attempt to release an already deallocated
object, and you'll see to which type of object it is sent. If you don't
add breaks, it will still be logged to the console IIRC.
j o a r
_______________________________________________
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.