KeyNotFoundException from the framework?

Hi there,

Using 2015r1, I’m getting an intermittent problem when using Window.ShowWithin. Can anyone understand the below, and tell me if it’s something I’m doing wrong, or if it’s within the framework?

Thanks,

Hamish

[code]2015-10-20 11:03:05 KeyNotFoundException: 0,

XojoFramework$6443

dictionaryValueGetter

Dictionary.Value%v%ov

RetinaNotifier.!NotificationDelegate%%ppp

__57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke

CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER

_CFXNotificationPost

-[NSNotificationCenter postNotificationName:object:userInfo:]

-[NSWindow _postWindowDidChangeBackingPropertiesAndDisplayWindowForPreviousBackingScaleFactor:previousColorSpace:]

__67-[NSWindow _updateSettingsSendingScreenChangeNotificationIfNeeded:]_block_invoke

NSPerformWithScreenUpdatesDisabled

-[NSWindow _updateSettingsSendingScreenChangeNotificationIfNeeded:]

-[NSWindow _setFrame:updateBorderViewSize:]

-[NSWindow _oldPlaceWindow:]

-[NSWindow _setFrameCommon:display:stashSize:]

-[NSWindow _setFrame:display:allowImplicitAnimation:stashSize:]

-[NSWindow setFrame:display:]

-[NSWindow(NSSheets) _positionSheetRect:onRect:andDisplay:]

-[NSWindow(NSSheets) _positionSheet:constrained:andDisplay:]

-[NSMoveHelper(NSSheets) _moveParent:andOpenSheet:]

-[NSWindow(NSSheets) _orderFrontRelativeToWindow:]

-[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:]

-[NSWindow _doOrderWindowWithoutAnimation:relativeTo:findKey:forCounter:force:isModal:]

-[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:]

-[NSApplication _orderFrontModalWindow:relativeToWindow:]

-[NSApplication _commonBeginModalSessionForWindow:relativeToWindow:modalDelegate:didEndSelector:contextInfo:]

-[NSApplication beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:]

XojoFramework$1976

XojoFramework$1973

XojoFramework$2565

XojoFramework$10440

RuntimeShowWithinWindow

Window.ShowWithin%%ooi4

windowFunctions.$ShowWithinAndRedraw%%oo

linkedRecords.linkedRecords.lrLinkToExistingRecord%%o<linkedRecords.linkedRecords>s

linkedRecords.linkedRecords.lrAddMenu%%o<linkedRecords.linkedRecords>

linkedRecords.linkedRecords.LinkedRecordsAddCanvasButton_action%%o<linkedRecords.linkedRecords>o

Delegate.IM_Invoke%%o

AddHandler.Stub.27%%

canvasButton.Event_MouseUp%%oi4i4

XojoFramework$4246

XojoFramework$1782

XojoFramework$1646

-[NSWindow _reallySendEvent:isDelayedEvent:]

-[NSWindow sendEvent:]

XojoFramework$1685

-[NSApplication sendEvent:]

XojoFramework$1234

XojoFramework$1235

Delegate.Invoke%%

Application._CallFunctionWithExceptionHandling%%op

XojoFramework$8800

XojoFramework$1234

-[NSApplication run]

XojoFramework$8802

RuntimeRun

REALbasic._RuntimeRun

_Main

main

start

– ENDS --[/code]

The exception is coming from RetinaNotifier.NotificationDelegate. Are you using a dictionary value in there without checking if it exists first?

Yes. Yes, I am. I should have spotted that. Sorry…

(I forgot that I had a class called RetinaNotifier!)