Xcode 11.2.1在打开项目时崩溃

时间:2019-11-13 19:24:47

标签: ios xcode

我刚刚下载了Xcode 11.2.1,现在,当我尝试打开一个现有项目时,Xcode立即崩溃。这仅发生在我的一个项目上,而没有发生在其他项目上。我可以创建一个新的空白项目。所有这些都是带有SwifUI的iOS“ SingleView”项目。

还有其他人看到过吗?

这是崩溃日志的开始:

Process:               Xcode [17611]
Path:                  /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier:            com.apple.dt.Xcode
Version:               11.2.1 (15526.1)
Build Info:            IDEFrameworks-15526001000000000~4 (11B500)
App Item ID:           497799835
App External ID:       833502318
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Xcode [17611]
User ID:               501

Date/Time:             2019-11-13 13:56:16.523 -0500
OS Version:            Mac OS X 10.15.1 (19B88)
Report Version:        12
Anonymous UUID:        59421F89-0AB5-B6E2-B437-53D2CEC68F51


Time Awake Since Boot: 170000 seconds

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: 11B500
UNCAUGHT EXCEPTION (NSInternalInconsistencyException): Cannot update for observer <NSColorPanel 0x7fabf38331a0> for the key path "_keyWindow.firstResponder" from <IDEApplication 0x7fac53511310>, 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   -[NSKeyValueNestedProperty object:withObservance:didChangeValueForKeyOrKeys:recurse:forwardingValues:] (in Foundation)
  4   NSKeyValueDidChange.llvm.18255262684423441536 (in Foundation)
  5   NSKeyValueDidChangeWithPerThreadPendingNotifications.llvm.18255262684423441536 (in Foundation)
  6   -[NSApplication _setKeyWindow:] (in AppKit)
  7   -[NSWindow _changeKeyAndMainLimitedOK:] (in AppKit)
  8   -[NSWindow _makeKeyRegardlessOfVisibility] (in AppKit)
  9   -[NSWindow makeKeyAndOrderFront:] (in AppKit)
 10   -[NSWindow(NSWindow_Theme) _prepareToRestoreRegularFromDock:forceActivation:wantsToBeKey:] (in AppKit)
 11   -[NSWindow(NSWindow_Theme) _prepareToRestoreFromDock:forceActivation:wantsToBeKey:] (in AppKit)
 12   -[NSWindow(NSWindow_Theme) _doRestoreComingFromDock:forceActivation:wantsToBeKey:] (in AppKit)
 13   -[NSWindowStackController handleDeminimizingWindow:] (in AppKit)
 14   -[NSWindow(NSWindowTabbing) _prepareTabbedWindowDeminimize] (in AppKit)
 15   -[NSWindow(NSWindow_Theme) _prepareToRestoreFromDock:forceActivation:wantsToBeKey:] (in AppKit)
 16   -[NSWindow(NSWindow_Theme) _doRestoreComingFromDock:forceActivation:wantsToBeKey:] (in AppKit)
 17   -[NSWindow _reallyDoOrderWindowAboveOrBelow:relativeTo:findKey:forCounter:force:isModal:] (in AppKit)
 18   -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] (in AppKit)
 19   -[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:] (in AppKit)
 20   -[NSWindow orderWindow:relativeTo:] (in AppKit)
 21   -[NSWindow makeKeyAndOrderFront:] (in AppKit)
 22   __103-[NSWindowStackController _doTabSelectionAndWindowOrderingAtIndex:makeKeyAndOrderFront:justOrderFront:]_block_invoke (in AppKit)
 23   NSPerformVisuallyAtomicChange (in AppKit)
 24   -[NSWindowStackController _doTabSelectionAndWindowOrderingAtIndex:makeKeyAndOrderFront:justOrderFront:] (in AppKit)
 25   -[NSWindowStackController setSelectedWindow:] (in AppKit)
 26   -[NSWindow(NSWindowTabbing) _doTabbedWindowOrderFront] (in AppKit)
 27   -[NSApplication _setKeyWindow:] (in AppKit)
 28   -[NSWindow _changeKeyAndMainLimitedOK:] (in AppKit)
 29   -[NSWindow _makeKeyRegardlessOfVisibility] (in AppKit)
 30   -[NSWindow makeKeyAndOrderFront:] (in AppKit)
 31   -[NSWindowController showWindow:] (in AppKit)
 32   -[IDEWorkspaceDocument setOrderedWindowControllerNames:] (in IDEKit)
 33   -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:] (in Foundation)
 34   -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] (in Foundation)
 35   _NSSetObjectValueAndNotify (in Foundation)
 36   -[IDEWorkspaceDocument revertStateWithDictionary:] (in IDEKit)
 37   -[DVTStateToken _pullStateFromDictionary:] (in DVTFoundation)
 38   -[DVTStateToken pullStateFromRepository] (in DVTFoundation)
 39   -[IDEWorkspaceDocument _readFromURL:ofType:simpleFilesFocused:error:] (in IDEKit)
 40   -[IDEWorkspaceDocument readFromURL:ofType:error:] (in IDEKit)
 41   -[NSDocument _initWithContentsOfURL:ofType:error:] (in AppKit)
 42   -[NSDocument initWithContentsOfURL:ofType:error:] (in AppKit)
 43   -[IDEDocumentController makeDocumentWithContentsOfURL:ofType:error:] (in IDEKit)
 44   __97-[NSDocumentController makeDocumentWithContentsOfURL:alternateContents:ofType:completionHandler:]_block_invoke (in AppKit)
 45   -[NSDocumentController makeDocumentWithContentsOfURL:alternateContents:ofType:completionHandler:] (in AppKit)
 46   __80-[NSDocumentController openDocumentWithContentsOfURL:display:completionHandler:]_block_invoke (in AppKit)
 47   __145-[IDEDocumentController _coordinateReadingAndGetAlternateContentsForOpeningDocumentAtURL:resolvingSymlinks:thenContinueOnMainThreadWithAccessor:]_block_invoke (in IDEKit)
 48   __144-[NSDocumentController _coordinateReadingAndGetAlternateContentsForOpeningDocumentAtURL:resolvingSymlinks:thenContinueOnMainThreadWithAccessor:]_block_invoke_4 (in AppKit)
 49   __144-[NSDocumentController _coordinateReadingAndGetAlternateContentsForOpeningDocumentAtURL:resolvingSymlinks:thenContinueOnMainThreadWithAccessor:]_block_invoke_2.872 (in AppKit)
 50   __144-[NSDocumentController _coordinateReadingAndGetAlternateContentsForOpeningDocumentAtURL:resolvingSymlinks:thenContinueOnMainThreadWithAccessor:]_block_invoke.871 (in AppKit)
 51   __144-[NSDocumentController _coordinateReadingAndGetAlternateContentsForOpeningDocumentAtURL:resolvingSymlinks:thenContinueOnMainThreadWithAccessor:]_block_invoke.869 (in AppKit)
 52   ___NSMainRunLoopPerformBlockInModes_block_invoke (in AppKit)
 53   __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ (in CoreFoundation)
 54   __CFRunLoopDoBlocks (in CoreFoundation)
 55   __CFRunLoopRun (in CoreFoundation)
 56   CFRunLoopRunSpecific (in CoreFoundation)
 57   RunCurrentEventLoopInMode (in HIToolbox)
 58   ReceiveNextEventCommon (in HIToolbox)
 59   _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox)
 60   _DPSNextEvent (in AppKit)
 61   -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] (in AppKit)
 62   -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in DVTKit)
 63   -[NSApplication run] (in AppKit)
 64   NSApplicationMain (in AppKit)
 65   main (in Xcode)
 66   start (in libdyld.dylib)

abort() called

2 个答案:

答案 0 :(得分:10)

打开项目文件夹 显示来自.xcworkspace或.xcodeproj的软件包内容 您将看到2个文件夹 xcshareddata xcuserdata 请删除 xcuserdata 文件夹 尝试打开应用程序

答案 1 :(得分:5)

请执行以下操作:

  1. 打开项目的文件夹
  2. 右键单击名为的文件.xcworkspace
  3. 点击 Show package contents
  4. 删除名为的文件夹-xcuserdata

    • 删除xcuserdata文件夹是安全的-此文件夹包含特定项目(source)的一些用户首选项。

您可以在here上阅读有关解决方案的更多信息。请参阅 udoy.soumik 的回复。