• 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
NSZombieEnabled still allows crash. Was: (gdb) Won't Answer...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSZombieEnabled still allows crash. Was: (gdb) Won't Answer...


  • Subject: NSZombieEnabled still allows crash. Was: (gdb) Won't Answer...
  • From: Jerry Krinock <email@hidden>
  • Date: Sat, 7 Mar 2009 12:58:12 -0800


On 2009 Mar 07, at 08:15, Keary Suska wrote:

With NSZombie enabled you the double free shouldn't even happen. Nothing is supposed to actually get released. Have you tried a CFZombieLevel 3?

Yes, come to think of it, you are correct. I enable zombies for debugging, in main(), like this:


int main(int argc, const char *argv[]) {

#ifdef DEBUG
    setenv("NSZombieEnabled", "YES", 1) ;
    setenv("NSAutoreleaseFreedObjectCheckEnabled", "YES", 1) ;
#endif

    if (getenv("NSZombieEnabled")) {
        NSLog (@"NSZombieEnabled for debugging.") ;
    }

if (getenv("NSAutoreleaseFreedObjectCheckEnabled")) {
NSLog (@"NSAutoreleaseFreedObjectCheckEnabled for debugging.") ;
}


    return NSApplicationMain(argc, argv);
}

But if I add this double-release code:

- (void)applicationDidFinishLaunching:(NSNotification *)note {
    NSDate* s = [NSDate date] ;
    NSLog(@"18409: %@", s) ;
    [s release] ;
    NSLog(@"18452: ") ;
    NSLog(@"18418: %@", s) ;
    ...

I still get a an old-fashioned crash:

NSZombieEnabled for debugging.
NSAutoreleaseFreedObjectCheckEnabled for debugging.
18409: 2009-03-07 12:53:29 -0800
18452:

[Session started at 2009-03-07 12:53:30 -0800.]
Loading program into debugger…
...


Have you tried a CFZombieLevel 3?

No, actually I found and fixed the problem yesterday by selectively eliminating new code. _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >(gdb) Won't Answer Me in Debugger Console (From: Jerry Krinock <email@hidden>)
 >Re: (gdb) Won't Answer Me in Debugger Console (From: Keary Suska <email@hidden>)

  • Prev by Date: Re: (gdb) Won't Answer Me in Debugger Console
  • Next by Date: Re: typedef enums are now unsigned?!
  • Previous by thread: Re: (gdb) Won't Answer Me in Debugger Console
  • Next by thread: Re: Info.plist preprocessing in single-file tool? [SOLVED]
  • Index(es):
    • Date
    • Thread