Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode Version 9.0.1 (9A1004) Crash with Cannot update for observer NSTouchBarFinder

Tags:

xcode

Opening a specific project Xcode crashes repeatably when opening specific project.

Opening another project seems fine. It seems that the touch-bar is creating some issues. Any ideas on how to resolve this.

Opening the project on a different MacBook without a touch-bar seems fine.

From the logs I can see that this is related to the NSTouchBarFinder and the IDE not being KVO compliant?

I keep getting this crash log:

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Application Specific Information:
ProductBuildVersion: 9A1004
UNCAUGHT EXCEPTION (NSInternalInconsistencyException): Cannot update for observer <NSTouchBarFinder 0x7fee281263e0> for the key path "_keyWindow.firstResponder" from <IDEApplication 0x7fee22f0b1c0>, most likely because the value for the key "_keyWindow" has changed without an appropriate KVO notification being sent. Check the KVO-compliance of the IDEApplication class.
UserInfo: (null)
Hints: 

Backtrace:
  0   __exceptionPreprocess (in CoreFoundation)
  1   DVTFailureHintExceptionPreprocessor (in DVTFoundation)
  2   objc_exception_throw (in libobjc.A.dylib)
  3   +[NSException raise:format:] (in CoreFoundation)
  4   -[NSKeyValueNestedProperty object:withObservance:didChangeValueForKeyOrKeys:recurse:forwardingValues:] (in Foundation)
  5   NSKeyValueDidChange (in Foundation)
  6   -[NSObject(NSKeyValueObserverNotification) didChangeValueForKey:] (in Foundation)
  7   -[NSApplication _setKeyWindow:] (in AppKit)
  8   -[NSWindow _changeKeyAndMainLimitedOK:] (in AppKit)
  9   -[NSWindow _makeKeyRegardlessOfVisibility] (in AppKit)
 10   NSPerformVisuallyAtomicChange (in AppKit)
 11   -[NSWindow makeKeyAndOrderFront:] (in AppKit)
 12   -[NSWindow(NSWindow_Theme) _finishDeminiaturizeFromDock:] (in AppKit)
 13   -[NSWindow(NSWindowTabbing) _doNonVisibleTabDeminimize] (in AppKit)
 14   -[NSWindowStackController handleDeminimizingWindow:] (in AppKit)
 15   -[NSWindow(NSWindowTabbing) _prepareTabbedWindowDeminimize] (in AppKit)
 16   -[NSWindow(NSWindow_Theme) _prepareToRestoreFromDock:forceActivation:wantsToBeKey:] (in AppKit)
 17   -[NSWindow(NSWindow_Theme) _doRestoreComingFromDock:forceActivation:wantsToBeKey:] (in AppKit)
 18   -[NSWindow _reallyDoOrderWindowAboveOrBelow:relativeTo:findKey:forCounter:force:isModal:] (in AppKit)
 19   -[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:] (in AppKit)
 20   -[NSWindow orderWindow:relativeTo:] (in AppKit)
 21   NSPerformVisuallyAtomicChange (in AppKit)
 22   -[NSWindowStackController _doTabSelectionAndWindowOrderingAtIndex:makeKeyAndOrderFront:justOrderFront:] (in AppKit)
 23   -[NSWindowStackController setSelectedWindow:] (in AppKit)
 24   -[NSWindow(NSWindowTabbing) _doTabbedWindowOrderFront] (in AppKit)
 25   -[NSApplication _setKeyWindow:] (in AppKit)
 26   -[NSWindow _changeKeyAndMainLimitedOK:] (in AppKit)
 27   -[NSWindow _makeKeyRegardlessOfVisibility] (in AppKit)
 28   NSPerformVisuallyAtomicChange (in AppKit)
 29   -[NSWindow makeKeyAndOrderFront:] (in AppKit)
 30   -[NSWindowController showWindow:] (in AppKit)
 31   -[IDEWorkspaceDocument setOrderedWindowControllerNames:] (in IDEKit)
 32   -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:usingBlock:] (in Foundation)
 33   -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] (in Foundation)
 34   _NSSetObjectValueAndNotify (in Foundation)
 35   -[IDEWorkspaceDocument revertStateWithDictionary:] (in IDEKit)
 36   -[DVTStateToken _pullStateFromDictionary:] (in DVTFoundation)
 37   -[DVTStateToken pullStateFromRepository] (in DVTFoundation)
 38   -[IDEWorkspaceDocument _readFromURL:ofType:simpleFilesFocused:error:] (in IDEKit)
 39   -[IDEWorkspaceDocument readFromURL:ofType:error:] (in IDEKit)
 40   -[NSDocument _initWithContentsOfURL:ofType:error:] (in AppKit)
 41   -[NSDocument initWithContentsOfURL:ofType:error:] (in AppKit)
 42   -[IDEDocumentController makeDocumentWithContentsOfURL:ofType:error:] (in IDEKit)
 43   __97-[NSDocumentController makeDocumentWithContentsOfURL:alternateContents:ofType:completionHandler:]_block_invoke (in AppKit)
 44   -[NSDocumentController makeDocumentWithContentsOfURL:alternateContents:ofType:completionHandler:] (in AppKit)
 45   __80-[NSDocumentController openDocumentWithContentsOfURL:display:completionHandler:]_block_invoke (in AppKit)
 46   __145-[IDEDocumentController _coordinateReadingAndGetAlternateContentsForOpeningDocumentAtURL:resolvingSymlinks:thenContinueOnMainThreadWithAccessor:]_block_invoke (in IDEKit)
 47   __144-[NSDocumentController _coordinateReadingAndGetAlternateContentsForOpeningDocumentAtURL:resolvingSymlinks:thenContinueOnMainThreadWithAccessor:]_block_invoke_2.922 (in AppKit)
 48   __144-[NSDocumentController _coordinateReadingAndGetAlternateContentsForOpeningDocumentAtURL:resolvingSymlinks:thenContinueOnMainThreadWithAccessor:]_block_invoke.921 (in AppKit)
 49   __144-[NSDocumentController _coordinateReadingAndGetAlternateContentsForOpeningDocumentAtURL:resolvingSymlinks:thenContinueOnMainThreadWithAccessor:]_block_invoke_4 (in AppKit)
 50   __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ (in CoreFoundation)
 51   __CFRunLoopDoBlocks (in CoreFoundation)
 52   __CFRunLoopRun (in CoreFoundation)
 53   CFRunLoopRunSpecific (in CoreFoundation)
 54   RunCurrentEventLoopInMode (in HIToolbox)
 55   ReceiveNextEventCommon (in HIToolbox)
 56   _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox)
 57   _DPSNextEvent (in AppKit)
 58   -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] (in AppKit)
 59   -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in DVTKit)
 60   -[NSApplication run] (in AppKit)
 61   NSApplicationMain (in AppKit)
 62   start (in libdyld.dylib)

abort() called

OS details:

Process:               Xcode [1733]
Path:                  /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier:            com.apple.dt.Xcode
Version:               9.0.1 (13249)
Build Info:            IDEFrameworks-13249000000000000~2
App Item ID:           497799835
App External ID:       823984564
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Xcode [1733]

OS Version:            Mac OS X 10.12.6 (16G29)
like image 695
Wayne Avatar asked Oct 30 '17 07:10

Wayne


1 Answers

I had the same issue this morning, even with the Xcode 9.0.0 version.

I succeeded to bypass the crash at the xcode launch by deleting the xcuserdatad folder (prefixed with your username) inside the project.xcworkspace folder.

like image 87
Alexis Avatar answered Oct 28 '22 03:10

Alexis