フルスクリーンモードで落ちる問題【AppKit NSWindow】

フルスクリーンモード対応時に出会ったエラー。
NSWindow.window:willUseFullScreenPresentationOptions:デリゲートの呼び出しで落ちている。

2015-01-01 00:00:00.970 MyApp[5028:303] *** Assertion failure in -[_NSWindowFullScreenTransition enterFullScreenTransitionForWindow:animated:activatingIt:], /SourceCache/AppKit/AppKit-1265/AppKit.subproj/NSWindowFullScreenTransition.m:1916
2015-01-01 00:00:00.971 MyApp[5028:303] fullscreen presentation options must include NSApplicationPresentationFullScreen
2015-01-01 00:00:00.972 MyApp[5028:303] (
	0   CoreFoundation                      0x00007fff8d23541c __exceptionPreprocess + 172
	1   libobjc.A.dylib                     0x00007fff90ca0e75 objc_exception_throw + 43
	2   CoreFoundation                      0x00007fff8d2351f8 +[NSException raise:format:arguments:] + 104
	3   Foundation                          0x00007fff9248dc61 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 189
	4   AppKit                              0x00007fff8de5ebad -[_NSWindowFullScreenTransition enterFullScreenTransitionForWindow:animated:activatingIt:] + 301
	5   AppKit                              0x00007fff8de5e49e -[NSWindow _enterFullScreenMode:animating:activating:] + 291
	6   AppKit                              0x00007fff8dd913d0 -[NSApplication sendAction:to:from:] + 327
	7   AppKit                              0x00007fff8dd9124e -[NSControl sendAction:to:] + 86
	8   AppKit                              0x00007fff8ddddd7d -[NSCell _sendActionFrom:] + 128
	9   AppKit                              0x00007fff8ddf7715 -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 2316
	10  AppKit                              0x00007fff8ddf6ae7 -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 487
	11  AppKit                              0x00007fff8ddf61fd -[NSControl mouseDown:] + 706
	12  AppKit                              0x00007fff8dd77d08 -[NSWindow sendEvent:] + 11296
	13  AppKit                              0x00007fff8dd16744 -[NSApplication sendEvent:] + 2021
	14  AppKit                              0x00007fff8db66a29 -[NSApplication run] + 646
	15  AppKit                              0x00007fff8db51803 NSApplicationMain + 940
	16  MyApp                               0x000000010005ce67 main + 119
	17  libdyld.dylib                       0x00007fff8fbf35fd start + 1
)

NSApplicationPresentationFullScreenも含めてreturnしないとエラーになる。

-(NSApplicationPresentationOptions)window:(NSWindow *)window willUseFullScreenPresentationOptions:(NSApplicationPresentationOptions)proposedOptions {
    return (NSApplicationPresentationFullScreen |    // Here!!!
            NSApplicationPresentationHideDock |
            NSApplicationPresentationAutoHideMenuBar);
}

広告