discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Weird Crash in -[NSAutoreleasePool release] – No Double-Release?


From: Philip Mötteli
Subject: Weird Crash in -[NSAutoreleasePool release] – No Double-Release?
Date: Sat, 28 Feb 2004 08:57:40 +0100

Hi


I'm still porting my application from MOSX, where it runs without a problem to GS on Linux. With GS I have suddenly a weird crash somewehre in -[NSAutoreleasePool release. Unfortunately, the backtrace in the debugger only shows the beginning of the event loop as its origin:

#0  0x0075004d in ?? ()
#1 -[NSAutoreleasePool dealloc] at NSAutoreleasePool.m:501
#2 -[NSAutoreleasePool release] at NSAutoreleasePool.m:458
#3 -[NSRunLoop acceptInputForMode:beforeDate:] at NSRunLoop.m:1997
#4 -[NSRunLoop runMode:beforeDate:] at NSRunLoop.m:2042
#5 -[NSRunLoop runUntilDate:] at NSRunLoop.m:2063
#6 -[NSRunLoop run] at NSRunLoop.m:2051
#7 main at main.m:53


Actually, the moment, the autorelease pool sends -release to its fourth object, the program crashes somewhere. At first sight, this looks like a double release of an object, so I set all the available flags in order to debug that:

        [NSObject enableDoubleReleaseCheck:YES];
        NSZombieEnabled = YES;
        NSDeallocateZombies = NO;


But nothing happens: no exception, no error message, nothing. Are there circumstances, where double-release-checks don't work?

I can't send any message to that object, too. The more and more I have the impression, that actually the class pointer of this object is pointing to something strange:

(gdb) p *((Class)(anObject->class_pointer)
$3 = {
        class_pointer = 0x4023f4e0,
        super_class = 0x822ce10,
        name = 0xc <Address 0xc out of bounds>,
        version = 3,
        info = 0;
        instance_size = 25,
        ivars = 0x6f705f73,
        subclass_list = 0x8220072,
        sibling_class = 0x0,
        protocols = 0x21,
        gc_object_type = 0x0,
}

At least, that would explain, why the double-release-check doesn't indicate at all, though I don't think I'm mangling with the class_pointer somewhere.


I'm a bit lost. Does anybody have any idea?


Thanks
Phil





reply via email to

[Prev in Thread] Current Thread [Next in Thread]