Ah, of course - silly me. Working on assumptions instead of using my eyes.

So the relevant code is this:
            NSMapInsertKnownAbsent(windowsForSheets, sheet, docWindow);
and seeing as windowForSheets is created with:
        windowsForSheets = NSCreateMapTable(NSObjectMapKeyCallBacks, 
NSObjectMapValueCallBacks, 0);
and NSObjectMapKeyCallBacks has a nil notAKeyMarker…

So if the sheet is nil, then an exception is raised. Not sure how that would be 
possible in my code, but at least I now understand what is going on.

Regards

Gideon



On 06/03/2012, at 10:42 AM, Mike Abdullah wrote:

> -[OAApplication 
> beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:]
> 
> That's definitely not part of Cocoa! You have the source. Dig in to find the 
> problem.
> 
> On 5 Mar 2012, at 15:15, Gideon King wrote:
> 
>> Hi, I am getting occasional reports of an exception from users of my 
>> software, but they are not able to reproduce it, and nor am I.
>> 
>> I have a sheet which has an NSCollectionView on it and a couple of buttons 
>> and a slider. The NIB also instantiates an array controller which is used as 
>> the content for the collection view.
>> 
>> This is the exception I get:
>> 
>> *** NSMapInsertKnownAbsent(): attempt to insert notAKeyMarker
>> 
>> 0 CoreFoundation 0x00007fff896a9fc6 __exceptionPreprocess + 198
>> 1 libobjc.A.dylib 0x00007fff855ced5e objc_exception_throw + 43
>> 2 CoreFoundation 0x00007fff896a9dfa +[NSException raise:format:arguments:] + 
>> 106
>> 3 CoreFoundation 0x00007fff896a9d84 +[NSException raise:format:] + 116
>> 4 Foundation 0x00007fff890f67bc -[NSClassicMapTable 
>> setItem:forKnownAbsentKey:] + 74
>> 5 OmniAppKit 0x000000010051f008 -[OAApplication 
>> beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:] + 184
>> 
>> I do not instantiate an NSClassicMapTable explicitly in my code, but am 
>> assuming that either the array controller or the collection view uses such 
>> things.
>> 
>> I have never been able to reproduce the problem myself, either in a test 
>> environment or anywhere else either on 10/6 or 10.7 (users have reported it 
>> on both operating system versions).
>> 
>> If anyone has any suggestions as to where to look for this, I'd be very 
>> grateful.
>> 
>> 
>> Regards
>> 
>> Gideon
>> 
>> 
>> 
>> 
>> 
>> 
>> _______________________________________________
>> 
>> 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:
>> https://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net
>> 
>> This email sent to cocoa...@mikeabdullah.net
> 


_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to