Re: EXC-BAD-ACCESS bug
Re: EXC-BAD-ACCESS bug
- Subject: Re: EXC-BAD-ACCESS bug
- From: Stephane Sudre <email@hidden>
- Date: Fri, 9 Mar 2007 22:56:38 +0100
On Feb 27, 2007, at 10:25 AM, email@hidden wrote:
Hello all,
I'm tracking a "EXC-BAD-EXCESS" bug in my Cocoa project, using
NSZombieEnabled as explained in
http://developer.apple.com/technotes/tn2004/
tn2124.html#TABFOUNDATIONVAR.
On my first attempt I got a message like this in the console :
2007-02-27 08:49:52.174 Hardy2[784] *** Selector 'release' sent to
dealloced instance 0x3f2fe90 of class UNKNOWN.Break at '-[_NSZombie
release]' to debug.
(gdb)
So I obediently put a breakpoint on "[_NSZombie release]" ; on the
second attempt all the significant
information I could get was the following :
(gdb) p/a $r4
$3 = 0x90a15918 <_errNewVars+364612>
(gdb) p/a *$r3
$4 = 0xa28806cc <_NSConstantStringClassReference+19200>
(The other register values I inspected were nil or illegible
pointers).
I don't know how
to probe deeper into the bug. Below is the function which triggers
the bug
(when the program exits it) :
-(void) openDocument:(id) sender
{
NSLog(@"openDocument called");
int result;
NSArray *fileTypes = [NSArray
arrayWithObjects:@"david_Hardy2",@"txt",@"text",@"rtf",@"rtfd",@"htm",
@"html",@"webarchive",nil];
...
[fileTypes release];
Give these 2 lines of code a second look.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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