#c #macos #objective-c #macos-mojave #xcode9.3
Вопрос:
Я получаю следующее сообщение об ошибке «сбой при исключении: окно было помечено как нуждающееся в другом обновлении структурных областей в проходе окна, но в нем уже было больше структурных областей обновления в проходах окна, чем представлений в окне» при попытке открыть окно NSWindow в Mojave Mac OS.
Мое приложение построено с помощью XCode 9.x
Сбой происходит после вызова [NSApplication runModalForWindows:] каждый раз.
Сведения в журнале сбоев следующие :
Date/Time: 2021-11-02 10:53:06.524 0530 OS Version: Mac OS X 10.14.5 (18F132) Report Version: 12 Anonymous UUID: xxx Time Awake Since Boot: 87000 seconds System Integrity Protection: disabled Crashed Thread: 0 CrBrowserMain Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_INSTRUCTION (SIGILL) Exception Codes: 0x0000000000000001, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Signal: Illegal instruction: 4 Termination Reason: Namespace SIGNAL, Code 0x4 Terminating Process: exc handler [16252] Application Specific Information: Crashing on exception: The window has been marked as needing another Layout Window pass, but it has already had more Layout Window passes than there are views in the window. Application Specific Backtrace 1: 0 CoreFoundation 0x00007fff30422e39 __exceptionPreprocess 256 1 libobjc.A.dylib 0x00007fff5a8633c6 objc_exception_throw 48 2 CoreFoundation 0x00007fff30422c6b [NSException raise:format:] 193 3 AppKit 0x00007fff2da67c3b -[NSWindow(NSDisplayCycle) _postWindowNeedsLayoutUnlessPostingDisabled] 1522 4 AppKit 0x00007fff2da675e7 -[NSWindow(NSConstraintBasedLayout) _setViewsNeedLayout:] 61 5 AppKit 0x00007fff2da2a21d -[NSView _informContainerThatSubviewsNeedLayout] 195 6 AppKit 0x00007fff2da2a1d4 -[NSView _informContainerThatSubviewsNeedLayout] 122 7 AppKit 0x00007fff2da2a1d4 -[NSView _informContainerThatSubviewsNeedLayout] 122 8 AppKit 0x00007fff2da2a1d4 -[NSView _informContainerThatSubviewsNeedLayout] 122 9 AppKit 0x00007fff2da2a1d4 -[NSView _informContainerThatSubviewsNeedLayout] 122 10 AppKit 0x00007fff2da2a1d4 -[NSView _informContainerThatSubviewsNeedLayout] 122 11 AppKit 0x00007fff2da2a1d4 -[NSView _informContainerThatSubviewsNeedLayout] 122 12 AppKit 0x00007fff2da2a1d4 -[NSView _informContainerThatSubviewsNeedLayout] 122 13 AppKit 0x00007fff2da2a1d4 -[NSView _informContainerThatSubviewsNeedLayout] 122 14 AppKit 0x00007fff2da29d25 -[NSView setNeedsLayout:] 741 15 AppKit 0x00007fff2da44668 -[NSView setLayer:] 1098 16 AppKit 0x00007fff2da43b6c -[NSView(NSInternal) _createLayerAndInitialize] 254 17 AppKit 0x00007fff2da4391c -[NSView _updateLayerBackedness] 822 18 AppKit 0x00007fff2daec285 -[NSView buildLayerTreeWithOwnLayerRequirement:someAncestorWantsLayer:] 2103 19 AppKit 0x00007fff2daebf17 -[NSView buildLayerTreeWithOwnLayerRequirement:someAncestorWantsLayer:] 1225 20 AppKit 0x00007fff2daebf17 -[NSView buildLayerTreeWithOwnLayerRequirement:someAncestorWantsLayer:] 1225 21 AppKit 0x00007fff2daebf17 -[NSView buildLayerTreeWithOwnLayerRequirement:someAncestorWantsLayer:] 1225 22 AppKit 0x00007fff2daebf17 -[NSView buildLayerTreeWithOwnLayerRequirement:someAncestorWantsLayer:] 1225 23 AppKit 0x00007fff2daebf17 -[NSView buildLayerTreeWithOwnLayerRequirement:someAncestorWantsLayer:] 1225 24 AppKit 0x00007fff2daebf17 -[NSView buildLayerTreeWithOwnLayerRequirement:someAncestorWantsLayer:] 1225 25 AppKit 0x00007fff2daebf17 -[NSView buildLayerTreeWithOwnLayerRequirement:someAncestorWantsLayer:] 1225 26 AppKit 0x00007fff2daebf17 -[NSView buildLayerTreeWithOwnLayerRequirement:someAncestorWantsLayer:] 1225 27 AppKit 0x00007fff2daeba08 -[NSView buildLayerTree] 465 28 AppKit 0x00007fff2daeb65e NSViewBuildLayerTreeForDisplay 46 29 AppKit 0x00007fff2daeb5cc -[NSWindow displayIfNeeded] 229 30 AppKit 0x00007fff2daeb440 __NSWindowGetDisplayCycleObserverForDisplay_block_invoke 684 31 AppKit 0x00007fff2dae6534 NSDisplayCycleObserverInvoke 162 32 AppKit 0x00007fff2dae60b4 NSDisplayCycleFlush 1030 33 AppKit 0x00007fff2db195e3 __37 [NSDisplayCycle currentDisplayCycle]_block_invoke.24 899 34 QuartzCore 0x00007fff3adfc003 _ZN2CA11Transaction19run_commit_handlersE18CATransactionPhase 49 35 QuartzCore 0x00007fff3adfc331 _ZN2CA7Context18commit_transactionEPNS_11TransactionE 525 36 QuartzCore 0x00007fff3adfb8c2 _ZN2CA11Transaction6commitEv 588 37 AppKit 0x00007fff2dae5a4d __65 [CATransaction(NSCATransaction) NS_setFlushesWithDisplayRefresh]_block_invoke 274 38 CoreFoundation 0x00007fff303c9734 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ 23 39 CoreFoundation 0x00007fff303c9669 __CFRunLoopDoObservers 451 40 CoreFoundation 0x00007fff3036c1fe __CFRunLoopRun 1143 41 CoreFoundation 0x00007fff3036bb35 CFRunLoopRunSpecific 459 42 HIToolbox 0x00007fff2f64a96b RunCurrentEventLoopInMode 292 43 HIToolbox 0x00007fff2f64a5ad ReceiveNextEventCommon 355 44 HIToolbox 0x00007fff2f64a436 _BlockUntilNextEventMatchingListInModeWithFilter 64 45 AppKit 0x00007fff2d9e4987 _DPSNextEvent 965 46 AppKit 0x00007fff2d9e371f -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] 1361 47 AppKit 0x00007fff2dc29ebf -[NSApplication _doModalLoop:peek:] 379 48 AppKit 0x00007fff2dc2895a __35-[NSApplication runModalForWindow:]_block_invoke_2 64 49 AppKit 0x00007fff2dc28907 __35-[NSApplication runModalForWindow:]_block_invoke 70 50 AppKit 0x00007fff2dc28171 _NSTryRunModal 100 51 AppKit 0x00007fff2dc28056 -[NSApplication runModalForWindow:] 128 ... Thread 0 Crashed:: CrBrowserMain Dispatch queue: com.apple.main-thread 0 com.apple.AppKit 0x00007fff2dde8a67 -[NSApplication _crashOnException:] 109 1 com.apple.AppKit 0x00007fff2dae5c84 __65 [CATransaction(NSCATransaction) NS_setFlushesWithDisplayRefresh]_block_invoke 841 2 com.apple.CoreFoundation 0x00007fff303c9734 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ 23 3 com.apple.CoreFoundation 0x00007fff303c9669 __CFRunLoopDoObservers 451 4 com.apple.CoreFoundation 0x00007fff3036c1fe __CFRunLoopRun 1143 5 com.apple.CoreFoundation 0x00007fff3036bb35 CFRunLoopRunSpecific 459 6 com.apple.HIToolbox 0x00007fff2f64a96b RunCurrentEventLoopInMode 292 7 com.apple.HIToolbox 0x00007fff2f64a5ad ReceiveNextEventCommon 355 8 com.apple.HIToolbox 0x00007fff2f64a436 _BlockUntilNextEventMatchingListInModeWithFilter 64 9 com.apple.AppKit 0x00007fff2d9e4987 _DPSNextEvent 965 10 com.apple.AppKit 0x00007fff2d9e371f -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] 1361 11 com.apple.AppKit 0x00007fff2dc29ebf -[NSApplication _doModalLoop:peek:] 379 12 com.apple.AppKit 0x00007fff2dc2895a __35-[NSApplication runModalForWindow:]_block_invoke_2 64 13 com.apple.AppKit 0x00007fff2dc28907 __35-[NSApplication runModalForWindow:]_block_invoke 70 14 com.apple.AppKit 0x00007fff2dc28171 _NSTryRunModal 100 15 com.apple.AppKit 0x00007fff2dc28056 -[NSApplication runModalForWindow:] 128 ...
В чем может быть причина этого и как это можно решить ?
Что я узнал от Google, так это то, что Mojave использует основную анимацию. Может ли это быть связано с проблемой, с которой я сталкиваюсь ?
Спасибо