Xcode 8.2.1 si blocca durante l'apertura del progetto con l'indice della matrice fuori limite

21

Ho appena effettuato l'upgrade a Xcode 8.2.1 e Xcode si blocca ogni volta che apro il mio progetto con il seguente traceback. Ho verificato che una versione precedente di Xcode (8.1) può ancora aprire il file di progetto. Qualsiasi aiuto sarebbe molto apprezzato.

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

Application Specific Information:
ProductBuildVersion: 8C1002
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) _changeValueForKey:key:key:usingBlock:] (in Foundation)
 12   _NSSetObjectValueAndNotify (in Foundation)
 13   -[IDEBatchFindNavigator updateScopeItems:] (in IDEKit)
 14   __44-[IDEBatchFindNavigator setupLocationPicker]_block_invoke_2 (in IDEKit)
 15   -[NSObject(DVTObservingConvenience) _dvt_newObserverForKeyPath:options:owner:creationBacktrace:withHandlerBlock:] (in DVTFoundation)
 16   -[NSObject(DVTObservingConvenience) dvt_newObserverForKeyPath:options:withHandlerBlock:] (in DVTFoundation)
 17   -[IDEBatchFindNavigator setupLocationPicker] (in IDEKit)
 18   -[IDEBatchFindNavigator viewDidInstall] (in IDEKit)
 19   -[DVTViewController _viewDidInstall] (in DVTKit)
 20   -[_DVTViewController_ViewLifecycleInterpositions viewDidMoveToWindow] (in DVTKit)
 21   -[NSView _setWindow:] (in AppKit)
 22   -[NSView addSubview:] (in AppKit)
 23   __42-[DVTReplacementView _setupViewController]_block_invoke (in DVTKit)
 24   DVTInvokeWithFailureHint (in DVTFoundation)
 25   -[DVTReplacementView _setupViewController] (in DVTKit)
 26   -[DVTReplacementView installedViewController] (in DVTKit)
 27   -[DVTReplacementView layoutTopDown] (in DVTKit)
 28   -[DVTLayoutView_ML _reallyLayoutIfNeededTopDown] (in DVTKit)
 29   +[DVTLayoutView_ML _doRecursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:completionCallBackHandlers:currentLayoutPass:needsSecondPass:] (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 _recursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:] (in DVTKit)
 36   -[DVTLayoutView_ML viewWillDraw] (in DVTKit)
 37   -[NSView viewWillDraw] (in AppKit)
 38   -[NSView viewWillDraw] (in AppKit)
 39   -[NSView viewWillDraw] (in AppKit)
 40   -[NSView _sendViewWillDrawInRect:clipRootView:] (in AppKit)
 41   -[NSView displayIfNeeded] (in AppKit)
 42   -[NSWindow displayIfNeeded] (in AppKit)
 43   ___NSWindowGetDisplayCycleObserver_block_invoke6365 (in AppKit)
 44   __37+[NSDisplayCycle currentDisplayCycle]_block_invoke (in AppKit)
 45   CA::Transaction::run_commit_handlers(CATransactionPhase) (in QuartzCore)
 46   CA::Context::commit_transaction(CA::Transaction*) (in QuartzCore)
 47   CA::Transaction::commit() (in QuartzCore)
 48   CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) (in QuartzCore)
 49   __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ (in CoreFoundation)
 50   __CFRunLoopDoObservers (in CoreFoundation)
 51   CFRunLoopRunSpecific (in CoreFoundation)
 52   RunCurrentEventLoopInMode (in HIToolbox)
 53   ReceiveNextEventCommon (in HIToolbox)
 54   _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox)
 55   _DPSNextEvent (in AppKit)
 56   -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] (in AppKit)
 57   -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in DVTKit)
 58   -[NSApplication run] (in AppKit)
 59   NSApplicationMain (in AppKit)
 60   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_block_invoke (in CoreFoundation)
 17   _CFXRegistrationPost (in CoreFoundation)
 18   ___CFXNotificationPost_block_invoke (in CoreFoundation)
 19   -[_CFXNotificationRegistrar find:object:observer:enumerator:] (in CoreFoundation)
 20   _CFXNotificationPost (in CoreFoundation)
 21   -[NSNotificationCenter postNotificationName:object:userInfo:] (in Foundation)
 22   -[NSNotificationCenter(DVTNSNotificationCenterAdditions) _dvt_postNotificationName:object:userInfo:] (in DVTFoundation)
 23   -[IDENavigableItemCoordinator _postNotificationNamed:forChangedItems:] (in IDEKit)
 24   -[IDENavigableItemCoordinator _delayedPostGraphAndPropertyChangeNotifications] (in IDEKit)
 25   __48-[DVTDelayedInvocation initWithTarget:selector:]_block_invoke (in DVTFoundation)
 26   -[DVTDelayedInvocation runBlock:] (in DVTFoundation)
 27   __NSFirePerformWithOrder (in Foundation)
 28   __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ (in CoreFoundation)
 29   __CFRunLoopDoObservers (in CoreFoundation)
 30   __CFRunLoopRun (in CoreFoundation)
 31   CFRunLoopRunSpecific (in CoreFoundation)
 32   RunCurrentEventLoopInMode (in HIToolbox)
 33   ReceiveNextEventCommon (in HIToolbox)
 34   _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox)
 35   _DPSNextEvent (in AppKit)
 36   -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] (in AppKit)
 37   -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in DVTKit)
 38   -[NSApplication run] (in AppKit)
 39   NSApplicationMain (in AppKit)
 40   start (in libdyld.dylib)

abort() called

Application Specific Signatures:
NSRangeException

Application Specific Backtrace 1:
0   CoreFoundation                      0x00007fff9993a452 __exceptionPreprocess + 178
1   DVTFoundation                       0x0000000106127762 DVTFailureHintExceptionPreprocessor + 194
2   libobjc.A.dylib                     0x00007fff882b8f7e objc_exception_throw + 48
3   CoreFoundation                      0x00007fff99851725 -[__NSArrayM objectAtIndex:] + 245
4   IDEKit                              0x000000010776c830 -[_IDENavigatorOutlineViewDataSource outlineView:child:ofItem:] + 190
5   AppKit                              0x00007fff86d092e5 refreshRowEntryItemAndLevelInfo + 327
6   AppKit                              0x00007fff86d02f67 -[NSOutlineView reloadItem:reloadChildren:] + 3024
7   IDEKit                              0x0000000107767d7b -[IDENavigatorOutlineView reloadItem:reloadChildren:] + 357
8   IDEKit                              0x000000010776ac2e __83-[_IDENavigatorOutlineViewDataSource _processNavigableItemGraphChangeNotification:]_block_invoke.735 + 522
9   DVTKit                              0x000000010685464f +[NSAnimationContext(DVTNSAnimationContextAdditions) dvt_nonAnimatedBlock:] + 132
10  IDEKit                              0x0000000107765441 -[IDENavigatorOutlineView suspendEditingWhilePerformingBlock:] + 101
11  IDEKit                              0x000000010776a76d -[_IDENavigatorOutlineViewDataSource _processNavigableItemGraphChangeNotification:] + 2226
12  DVTFoundation                       0x0000000106127576 DVTInvokeWithLazyFailureHint + 100
13  DVTFoundation                       0x00000001060e1f32 __48-[_DVTNotificationReceiver receiveNotification:]_block_invoke.42 + 149
14  DVTFoundation                       0x00000001060e1c7f -[_DVTNotificationReceiver receiveNotification:] + 1054
15  CoreFoundation                      0x00007fff998c5b1c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
16  CoreFoundation                      0x00007fff998c5aaf ___CFXRegistrationPost_block_invoke + 63
17  CoreFoundation                      0x00007fff998c5a27 _CFXRegistrationPost + 407
18  CoreFoundation                      0x00007fff998c5792 ___CFXNotificationPost_block_invoke + 50
19  CoreFoundation                      0x00007fff99882542 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1922
20  CoreFoundation                      0x00007fff99881795 _CFXNotificationPost + 693
21  Foundation                          0x00007fff9718e17a -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
22  DVTFoundation                       0x00000001060e338a -[NSNotificationCenter(DVTNSNotificationCenterAdditions) _dvt_postNotificationName:object:userInfo:] + 360
23  IDEKit                              0x000000010794c00f -[IDENavigableItemCoordinator _postNotificationNamed:forChangedItems:] + 542
24  IDEKit                              0x000000010794c35d -[IDENavigableItemCoordinator _delayedPostGraphAndPropertyChangeNotifications] + 713
25  DVTFoundation                       0x0000000105ef15a8 __48-[DVTDelayedInvocation initWithTarget:selector:]_block_invoke + 79
26  DVTFoundation                       0x0000000105ef298b -[DVTDelayedInvocation runBlock:] + 257
27  Foundation                          0x00007fff9726884a __NSFirePerformWithOrder + 339
28  CoreFoundation                      0x00007fff998cefc7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
29  CoreFoundation                      0x00007fff998cef37 __CFRunLoopDoObservers + 391
30  CoreFoundation                      0x00007fff998ae408 __CFRunLoopRun + 872
31  CoreFoundation                      0x00007fff998ade38 CFRunLoopRunSpecific + 296
32  HIToolbox                           0x00007fff87c2b935 RunCurrentEventLoopInMode + 235
33  HIToolbox                           0x00007fff87c2b76f ReceiveNextEventCommon + 432
34  HIToolbox                           0x00007fff87c2b5af _BlockUntilNextEventMatchingListInModeWithFilter + 71
35  AppKit                              0x00007fff869a2df6 _DPSNextEvent + 1067
36  AppKit                              0x00007fff869a2226 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
37  DVTKit                              0x00000001066d1eaf -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 396
38  AppKit                              0x00007fff86996d80 -[NSApplication run] + 682
39  AppKit                              0x00007fff86960368 NSApplicationMain + 1176
40  libdyld.dylib                       0x00007fff94a015ad start + 1
41  ???                                 0x0000000000000001 0x0 + 1
    
posta Eric Conner 21.12.2016 - 03:20
fonte

5 risposte

19

Ok, sono riuscito a risolvere questo problema eliminando la mia directory .xcworkspace e ricreandola tramite pod install . Xcode si apre e sono in grado di costruire il mio progetto.

Modifica : Come altri hanno suggerito una soluzione migliore è quella di eliminare la directory xcuserdata da dentro .xcworkspace. Questo è più veloce in quanto non è necessario eseguire nuovamente l'installazione di pod ogni volta.

    
risposta data 21.12.2016 - 19:30
fonte
12

La risposta corretta è Il commento di Lukasz :

  1. Fai clic con il pulsante destro del mouse sul file .xcworkspace > Mostra contenuto pacchetto
  2. Elimina la cartella xcuserdata

E ora Xcode aprirà l'area di lavoro del progetto bene.

    
risposta data 31.01.2017 - 20:52
fonte
7

Per gli altri che hanno riscontrato un problema simile, ma ciò accade solo quando Navigatore Trova è attivato nell'area del navigatore. Prova a fare clic su Project Navigator o CMD + 1 ripetutamente al momento dell'avvio. Sembra divertente ma funziona.

    
risposta data 10.01.2017 - 02:26
fonte
2

Oltre a eliminare la cartella xcuserdata nella directory dello spazio di lavoro del progetto, sono stato anche in grado di rimediare a questo particolare crash eliminando i dati derivati (sia per il progetto aperto mentre Xcode si è arrestato, sia per tutti i progetti) a ~/Library/Developer/Xcode/DerivedData . L'ultima volta che Xcode è andato in crash, ho dovuto fare entrambe le cose per poter ricominciare Xcode, quindi penso che cancellare entrambi sia la tua scommessa più sicura (almeno per ora).

    
risposta data 01.02.2017 - 10:56
fonte
0
  • sì l'eliminazione di xcuserdata aiuta.
  • Ho usato per cancellare i dati derivati ma quindi si bloccherebbe di nuovo immediatamente su Riapri se provassi a fare qualcosa prima dell'indicizzazione finito di nuovo.
  • Ho notato che è successo solo su a progetto personale che ho curato a casa e nel lavoro.
  • Il nome utente era diverso su entrambi, quindi ho finito con 2 voci utente in xcuserdata my lavoro login username e il mio nome utente.
  • Ho notato che entrambi hanno I punti di interruzione.
  • E l'errore lanciato è _IDENavigatorOutlineViewDataSource quindi è qualcosa sui pannelli laterali di LHS in Xcode?
  • Puoi aggiungere un .ignore per xcuserdata senza problemi uno spazio di lavoro?

    
risposta data 21.02.2017 - 13:19
fonte

Leggi altre domande sui tag