2017-01-25 86 views
-1

刚开始时,我在XCode中编写了一些(iOS)代码。看起来是IDE的一部分。崩溃日志说,IDE有一个NSRangeException。任何想法如何找到问题或重置,所以我回去?Xcode 8.1和8.2.1在启动时崩溃

我已清除此项目的派生数据并再次启动Xcode。它显示一秒钟然后崩溃。当我查看派生的数据文件夹时,它看起来像Xcode开始创建/index/debug/iphonesimulator10.1-x86_64/.xcindex/db.xcindexdb ...文件,然后在该过程中崩溃。所以可能与我在第一次崩溃时运行的模拟器有关,但我没有使用它。

我试着回滚到之前版本的project.pbxproj,仍然有相同的崩溃问题。而Xcode只在这个项目上崩溃。我可以打开其他人。

更新:我升级到Xcode 8.2.1,仍然有相同的问题。我使用Pods,这意味着我正在使用工作区。不知道这是否导致任何问题。

这是可爱的碰撞报告。

Process:    Xcode [835] 
Path:     /Applications/Xcode.app/Contents/MacOS/Xcode 
Identifier:   com.apple.dt.Xcode 
Version:    8.1 (11544) 
Build Info:   IDEFrameworks-11544000000000000~4 
Code Type:    X86-64 (Native) 
Parent Process:  ??? [1] 
Responsible:   Xcode [835] 
User ID:    501 

Date/Time:    2017-01-24 21:22:55.528 -0800 
OS Version:   Mac OS X 10.12.1 (16B2555) 
Report Version:  12 
Anonymous UUID:  xxx 


Time Awake Since Boot: 610 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: 8B62 
UNCAUGHT EXCEPTION (NSRangeException): *** -[__NSArrayM objectAtIndex:]: index 3 beyond bounds [0 .. 2] 
UserInfo: (null) 
Hints: 
    0: Creation Backtrace for Notification Token: 

    0 -[_DVTNotificationReceiver initWithBlock:queue:] (in DVTFoundation) 
    1 -[NSNotificationCenter(DVTNSNotificationCenterAdditions) dvt_addObserverForName:object:queue:usingBlock:] (in DVTFoundation) 
    2 -[_IDENavigatorOutlineViewDataSource setRootItems:] (in IDEKit) 
    3 -[IDENavigatorOutlineView _updateRootItems:sortDescriptors:] (in IDEKit) 
    4 -[IDENavigatorOutlineView setRootItems:] (in IDEKit) 
    5 -[IDENavigatorOutlineView _updateBoundContentArrayOrSet] (in IDEKit) 
    6 -[IDENavigatorOutlineView updateBoundContentArray] (in IDEKit) 
    7 -[NSObject(DVTBindingUtilities) updateBoundValueForBinding:] (in DVTKit) 
    8 -[DVTBindingHelper observeValueForKeyPath:ofObject:change:context:] (in DVTKit) 
    9 NSKeyValueNotifyObserver (in Foundation) 
10 NSKeyValueDidChange (in Foundation) 
11 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:usingBlock:] (in Foundation) 
12 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] (in Foundation) 
13 _NSSetObjectValueAndNotify (in Foundation) 
14 -[IDEBatchFindNavigator updateScopeItems:] (in IDEKit) 
15 __44-[IDEBatchFindNavigator setupLocationPicker]_block_invoke_2 (in IDEKit) 
16 -[NSObject(DVTObservingConvenience) _dvt_newObserverForKeyPath:options:owner:creationBacktrace:withHandlerBlock:] (in DVTFoundation) 
17 -[NSObject(DVTObservingConvenience) dvt_newObserverForKeyPath:options:withHandlerBlock:] (in DVTFoundation) 
18 -[IDEBatchFindNavigator setupLocationPicker] (in IDEKit) 
19 -[IDEBatchFindNavigator viewDidInstall] (in IDEKit) 
20 -[DVTViewController _viewDidInstall] (in DVTKit) 
21 -[_DVTViewController_ViewLifecycleInterpositions viewDidMoveToWindow] (in DVTKit) 
22 -[NSView _setWindow:] (in AppKit) 
23 -[NSView addSubview:] (in AppKit) 
24 __42-[DVTReplacementView _setupViewController]_block_invoke (in DVTKit) 
25 DVTInvokeWithFailureHint (in DVTFoundation) 
26 -[DVTReplacementView _setupViewController] (in DVTKit) 
27 -[DVTReplacementView installedViewController] (in DVTKit) 
28 -[DVTReplacementView layoutTopDown] (in DVTKit) 
29 -[DVTLayoutView_ML _reallyLayoutIfNeededTopDown] (in DVTKit) 
30 +[DVTLayoutView_ML _doRecursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:completionCallBackHandlers:currentLayoutPass:needsSecondPass:] (in DVTKit) 
31 +[DVTLayoutView_ML _doRecursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:completionCallBackHandlers:currentLayoutPass:needsSecondPass:] (in DVTKit) 
32 +[DVTLayoutView_ML _doRecursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:completionCallBackHandlers:currentLayoutPass:needsSecondPass:] (in DVTKit) 
33 +[DVTLayoutView_ML _doRecursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:completionCallBackHandlers:currentLayoutPass:needsSecondPass:] (in DVTKit) 
34 +[DVTLayoutView_ML _doRecursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:completionCallBackHandlers:currentLayoutPass:needsSecondPass:] (in DVTKit) 
35 +[DVTLayoutView_ML _doRecursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:completionCallBackHandlers:currentLayoutPass:needsSecondPass:] (in DVTKit) 
36 +[DVTLayoutView_ML _recursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:] (in DVTKit) 
37 -[DVTLayoutView_ML viewWillDraw] (in DVTKit) 
38 -[NSView(NSInternal) _sendViewWillDraw] (in AppKit) 
39 -[NSView viewWillDraw] (in AppKit) 
40 -[NSView(NSInternal) _sendViewWillDraw] (in AppKit) 
41 -[NSView viewWillDraw] (in AppKit) 
42 -[NSView(NSInternal) _sendViewWillDraw] (in AppKit) 
43 -[NSView viewWillDraw] (in AppKit) 
44 -[NSView(NSInternal) _sendViewWillDraw] (in AppKit) 
45 -[NSView _sendViewWillDrawInRect:clipRootView:] (in AppKit) 
46 -[NSView displayIfNeeded] (in AppKit) 
47 -[NSWindow displayIfNeeded] (in AppKit) 
48 ___NSWindowGetDisplayCycleObserver_block_invoke.6219 (in AppKit) 
49 __37+[NSDisplayCycle currentDisplayCycle]_block_invoke (in AppKit) 
50 CA::Transaction::run_commit_handlers(CATransactionPhase) (in QuartzCore) 
51 CA::Context::commit_transaction(CA::Transaction*) (in QuartzCore) 
52 CA::Transaction::commit() (in QuartzCore) 
53 __37+[NSDisplayCycle currentDisplayCycle]_block_invoke.31 (in AppKit) 
54 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ (in CoreFoundation) 
55 __CFRunLoopDoObservers (in CoreFoundation) 
56 __CFRunLoopRun (in CoreFoundation) 
57 CFRunLoopRunSpecific (in CoreFoundation) 
58 RunCurrentEventLoopInMode (in HIToolbox) 
59 ReceiveNextEventCommon (in HIToolbox) 
60 _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox) 
61 _DPSNextEvent (in AppKit) 
62 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] (in AppKit) 
63 -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in DVTKit) 
64 -[NSApplication run] (in AppKit) 
65 NSApplicationMain (in AppKit) 
66 start (in libdyld.dylib) 

Backtrace: 
    0 __exceptionPreprocess (in CoreFoundation) 
    1 DVTFailureHintExceptionPreprocessor (in DVTFoundation) 
    2 objc_exception_throw (in libobjc.A.dylib) 
    3 -[__NSArrayM objectAtIndex:] (in CoreFoundation) 
    4 -[_IDENavigatorOutlineViewDataSource outlineView:child:ofItem:] (in IDEKit) 
    5 refreshRowEntryItemAndLevelInfo (in AppKit) 
    6 -[NSOutlineView reloadItem:reloadChildren:] (in AppKit) 
    7 -[IDENavigatorOutlineView reloadItem:reloadChildren:] (in IDEKit) 
    8 __83-[_IDENavigatorOutlineViewDataSource _processNavigableItemGraphChangeNotification:]_block_invoke.735 (in IDEKit) 
    9 +[NSAnimationContext(DVTNSAnimationContextAdditions) dvt_nonAnimatedBlock:] (in DVTKit) 
10 -[IDENavigatorOutlineView suspendEditingWhilePerformingBlock:] (in IDEKit) 
11 -[_IDENavigatorOutlineViewDataSource _processNavigableItemGraphChangeNotification:] (in IDEKit) 
12 DVTInvokeWithLazyFailureHint (in DVTFoundation) 
13 __48-[_DVTNotificationReceiver receiveNotification:]_block_invoke.42 (in DVTFoundation) 
14 -[_DVTNotificationReceiver receiveNotification:] (in DVTFoundation) 
15 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ (in CoreFoundation) 
16 _CFXRegistrationPost (in CoreFoundation) 
17 ___CFXNotificationPost_block_invoke (in CoreFoundation) 
18 -[_CFXNotificationRegistrar find:object:observer:enumerator:] (in CoreFoundation) 
19 _CFXNotificationPost (in CoreFoundation) 
20 -[NSNotificationCenter postNotificationName:object:userInfo:] (in Foundation) 
21 -[NSNotificationCenter(DVTNSNotificationCenterAdditions) _dvt_postNotificationName:object:userInfo:] (in DVTFoundation) 
22 -[IDENavigableItemCoordinator _postNotificationNamed:forChangedItems:] (in IDEKit) 
23 -[IDENavigableItemCoordinator _delayedPostGraphAndPropertyChangeNotifications] (in IDEKit) 
24 __48-[DVTDelayedInvocation initWithTarget:selector:]_block_invoke (in DVTFoundation) 
25 -[DVTDelayedInvocation runBlock:] (in DVTFoundation) 
26 __NSFirePerformWithOrder (in Foundation) 
27 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ (in CoreFoundation) 
28 __CFRunLoopDoObservers (in CoreFoundation) 
29 __CFRunLoopRun (in CoreFoundation) 
30 CFRunLoopRunSpecific (in CoreFoundation) 
31 RunCurrentEventLoopInMode (in HIToolbox) 
32 ReceiveNextEventCommon (in HIToolbox) 
33 _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox) 
34 _DPSNextEvent (in AppKit) 
35 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] (in AppKit) 
36 -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in DVTKit) 
37 -[NSApplication run] (in AppKit) 
38 NSApplicationMain (in AppKit) 
39 start (in libdyld.dylib) 

abort() called 
+0

看到这个http://stackoverflow.com/questions/28563918/nsarraym-objectatindex-index-2-beyond-bounds-for-empty-array –

+0

@ Anbu.Karthik谢谢。但这是Xcode因苹果代码而崩溃,而不是我的。这个堆栈跟踪属于Xcode。 –

+0

其他项目如何?只有在打开指定的项目时才会崩溃? – nynohu

回答

0

如果我删除我的Xcode项目文件夹中的“生成”文件夹,然后启动Xcode它的作品! (在Xcode用户库文件夹,而不是导出的数据文件夹)

-1

可能是你可以更新您的Xcode到最新版本,即:8.2.1。 :)

+0

我已更新至8.2.1(当前最新版本),但仍有问题。有趣的是,我还没有运行最新的。 AppStore从未向我展示过Xcode的更新......反正还没有爱...... –