#40 Unsupported Pointer Functions, Snow Leopard

v0.6.0 Beta
open
5
2009-10-12
2009-10-12
Anonymous
No

Below is a discussion on the Cocoa mailing list about the messages (and sometimes exceptions!!!) that RegexKit throws out on Snow Leopard.

Is there anyone alive around here to make a new release? I've tried building the code and there are some other errors and rather worrying looking warnings, I'd prefer it if someone familiar with the situation were to make a new release.

On 10.10.2009, at 13:56, Chris Idou wrote:
>
>
> 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?

Sure: replace NSPointerFunctionsIntegerPersonality by NSPointerFunctionsIntegerPersonality | NSPointerFunctionsOpaqueMemory.

Best
Kai

>
>
> + (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 <bbum@mac.com>
> To: Chris Idou <idou747@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: 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/lists%40kai-bruening.de
>
> This email sent to lists@kai-bruening.de

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks