Below is the RegexKit code that causes the Snow Leopard error. After reading
the doco, I don't feel very enlightened about what the unsupported
configuration is, or what the solution might be. Can anyone give me a clue?
+ (void)load
{
RKAtomicMemoryBarrier(); // Extra cautious
if(RKCacheLoadInitialized== 1) { return; }
if(RKAtomicCompareAndSwapInt(0, 1, &RKCacheLoadInitialized)) {
if((cacheMapKeyCallBacks= dlsym(RTLD_DEFAULT, "NSIntegerMapKeyCallBacks"))
== NULL) { cacheMapKeyCallBacks= dlsym(RTLD_DEFAULT, "NSIntMapKeyCallBacks"); }
#ifdef ENABLE_MACOSX_GARBAGE_COLLECTION
id garbageCollector = objc_getClass("NSGarbageCollector");
if(garbageCollector != NULL) {
if([garbageCollector defaultCollector] != NULL) {
id pointerFunctions = objc_getClass("NSPointerFunctions");
RKCacheIntegerKeyPointerFunctions = [pointerFunctions
pointerFunctionsWithOptions:NSPointerFunctionsIntegerPersonality];
RKCacheIntegerKeyPointerFunctions.acquireFunction =
intPointerFunctionsAcquire;
RKCacheIntegerKeyPointerFunctions.descriptionFunction =
intPointerFunctionsDescription;
RKCacheIntegerKeyPointerFunctions.hashFunction =
intPointerFunctionsHash;
RKCacheIntegerKeyPointerFunctions.isEqualFunction =
intPointerFunctionsIsEqual;
RKCacheIntegerKeyPointerFunctions.relinquishFunction =
intPointerFunctionsRelinquish;
RKCacheIntegerKeyPointerFunctions.sizeFunction =
intPointerFunctionsSize;
RKCacheObjectValuePointerFunctions = [pointerFunctions
pointerFunctionsWithOptions:(NSPointerFunctionsZeroingWeakMemory|
NSPointerFunctionsObjectPersonality)];
[[garbageCollector defaultCollector]
disableCollectorForPointer:RKCacheIntegerKeyPointerFunctions];
[[garbageCollector defaultCollector]
disableCollectorForPointer:RKCacheObjectValuePointerFunctions];
}
}
#endif // ENABLE_MACOSX_GARBAGE_COLLECTION
}
}
________________________________
From: Bill Bumgarner <b...@mac.com>
To: Chris Idou <idou...@yahoo.com>
Cc: cocoa-dev@lists.apple.com
Sent: Thu, 24 September, 2009 12:36:04 PM
Subject: Re: Snow Leopard: unsupported PointerFunctions configuration was
requested
On Sep 23, 2009, at 7:09 PM, Chris Idou wrote:
Very early in application startup, even before main() is called, I get the
following error:
>
> 2009-09-24 12:07:11.462 MyApp[5534:a0f] *** An unsupported PointerFunctions
> configuration was requested, probably for use by NSMapTable, NSHashTable, or
> NSPointerArray. The requested configuration fails due to integer personality
> not using opaque memory
>
> It happens twice on startup, and below are the stack traces when it happens:
>
> What does it all mean?
>
>
> #0 0x7fff84b342f7 in NSLog
> #1 0x7fff84ac84d1 in +[NSConcretePointerFunctions
> initializeSlice:withOptions:]
> #2 0x7fff84aea796 in -[NSConcretePointerFunctions initWithOptions:]
> #3 0x7fff84aea74d in +[NSPointerFunctions pointerFunctionsWithOptions:]
> #4 0x10004b633 in +[RKCache load]
One change to the NSPointerFunction based collection classes (which support a
number of things that NSArray & the like do not) between Leopard and Snow
Leopard was to tighten up the validation of the pointer function validation
such that a handful of non-sensical configurations are detected that weren't
before.
I.e. RKCache is trying to create a set of pointer functions that doesn't make
sense (and for whose behavior is undefined).
As someone else pointed out, RK is most likely RegexKit and, thus, the source
is available and can be fixed. Given the relatively common use of RK*, please
provide a patch to the author so it can be fixed upstream.
b.bum
________________________________
Get more done like never before with Yahoo!7 Mail. Learn more.
__________________________________________________________________________________
Get more done like never before with Yahoo!7 Mail.
Learn more: http://au.overview.mail.yahoo.com/
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please 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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com