[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
libobjc compiled with debugging symbols [was: Weird Crash in -[NSAutorel
From: |
Philip Mötteli |
Subject: |
libobjc compiled with debugging symbols [was: Weird Crash in -[NSAutoreleasePool release] – No Double-Release?] |
Date: |
Sun, 29 Feb 2004 00:30:10 +0100 |
Hi
I'm still fighting with my weird object, that crashes my program, when
sent a -release in the autorelease pool (look at the end of this
posting for a reminder). So far I haven't been lucky to find a
solution.
I would like to have a closer look, what makes the runtime crash when
dealing with that object. Where and how could I obtain a version of
libobjc, compiled with debugging symbols on. Is the one in
gnustep/dev-libs/libobjc ok? Or is that an old one, that would make
more harm than good?
Re
Phil
PS: The old posting:
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
- libobjc compiled with debugging symbols [was: Weird Crash in -[NSAutoreleasePool release] – No Double-Release?],
Philip Mötteli <=