作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
打开特定项目 打开特定项目时,Xcode 会反复崩溃。
打开另一个项目似乎没问题。触摸栏似乎造成了一些问题。关于如何解决此问题的任何想法。
在另一台没有触摸栏的 MacBook 上打开项目似乎没问题。
从日志中我可以看到这与 NSTouchBarFinder 和 IDE 不兼容 KVO 有关?
我不断收到此崩溃日志:
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
操作系统详细信息:
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)
最佳答案
今天早上我也遇到了同样的问题,即使使用的是 Xcode 9.0.0 版本。
通过删除 project.xcworkspace
文件夹内的 xcuserdatad
文件夹(以您的用户名开头),我成功绕过了 xcode 启动时的崩溃。
关于Xcode 版本 9.0.1 (9A1004) 崩溃,无法更新观察者 NSTouchBarFinder,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47010389/
我是一名优秀的程序员,十分优秀!