discuss-gnustep
[Top][All Lists]
Advanced

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

NSValue valueWithNonretainedObject:


From: Philippe Roussel
Subject: NSValue valueWithNonretainedObject:
Date: Tue, 09 Mar 2010 16:03:13 +0100

Hi all,

I'm trying to use [NSValue valueWithNonretainedObject:obj] to wrap an
object before adding it to a mutable set to avoid increasing its retain
count and I'm getting this backtrace :

#0  0x0011f7b2 in sarray_get_safe (receiver=0x867e598, op=0xf2fbc0) at 
/build/buildd/gcc-4.4-4.4.1/src/libobjc/objc/sarray.h:233
#1  objc_msg_lookup (receiver=0x867e598, op=0xf2fbc0) at 
/build/buildd/gcc-4.4-4.4.1/src/libobjc/sendmsg.c:225
#2  0x00d106d6 in -[GSNonretainedObjectValue hash] (self=0x8727968, 
_cmd=0xf357a0) at GSConcreteValueTemplate.m:187
#3  0x00d2686f in GSIMapRemangleBuckets (map=0x8299f84, old_buckets=0x8667cf8, 
old_bucketCount=11, new_buckets=0x8412a48, new_bucketCount=21) at 
../Headers/Additions/GNUstepBase/GSIMap.h:485
#4  0x00d26b77 in GSIMapResize (map=0x8299f84, new_capacity=14) at 
../Headers/Additions/GNUstepBase/GSIMap.h:731
#5  0x00d26beb in GSIMapRightSizeMap (map=0x8299f84, capacity=18) at 
../Headers/Additions/GNUstepBase/GSIMap.h:754
#6  0x00d26e93 in GSIMapAddKey (map=0x8299f84, key=...) at 
../Headers/Additions/GNUstepBase/GSIMap.h:1021
#7  0x00d284a2 in -[GSMutableSet addObject:] (self=0x8299f80, _cmd=0x808f150, 
anObject=0x872a318) at GSSet.m:548
#8  0x08067eae in -[ConfigManager registerClient:forKey:] (self=0x83ebf50, 
_cmd=0x8098980, client=0x8575088, key=0x809846c) at ConfigManager.m:167

The NSValue is created in frame #8 and added to the mutable set in frame
#7, as you might have guessed. The object wrapped in NSValue is an
instance of a NSView subclass.

Can you extract meaningful informations from this backtrace ? I'm using
base 1.19.3 but a quick test with svn trunk gave the same crash.

Thanks,
Philippe
-- 
http://www.aworldofwishes.net/wish/23/





reply via email to

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