• 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
EXC-BAD-ACCESS bug
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

EXC-BAD-ACCESS bug


  • Subject: EXC-BAD-ACCESS bug
  • From: email@hidden
  • Date: Tue, 27 Feb 2007 10:25:31 +0100 (CET)
  • Importance: Normal

               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];
    GGOpenPanel *oPanel = (GGOpenPanel*) [GGOpenPanel openPanel];

    [oPanel again];
    result = [oPanel runModalForTypes:fileTypes];
	[fileTypes release];
    if (result == NSOKButton) {
        NSArray *filesToOpen = [oPanel URLs];
		NSError** outError;
        int i, count = [filesToOpen count];
        for (i=0; i<count; i++) {
            NSURL* anURL = [filesToOpen objectAtIndex:i];
			id currentDoc = [self openDocumentWithContentsOfURL:anURL display:YES
error:outError];
        }
    }

}

                                                                                                        Ewan



_______________________________________________

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

  • Follow-Ups:
    • Re: EXC-BAD-ACCESS bug
      • From: Sherm Pendley <email@hidden>
    • Re: EXC-BAD-ACCESS bug
      • From: Joar Wingfors <email@hidden>
  • Prev by Date: Re: porting core data app to the dark side
  • Next by Date: document window appears very briefly
  • Previous by thread: Re: Stack Trace without /usr/bin/atos
  • Next by thread: Re: EXC-BAD-ACCESS bug
  • Index(es):
    • Date
    • Thread