Xcode 8.2.1 lumpuh saat membuka proyek dengan indeks array di luar batas


21

Saya baru saja memutakhirkan ke Xcode 8.2.1 dan Xcode macet setiap kali saya membuka proyek saya dengan traceback berikut. Saya memverifikasi bahwa versi Xcode yang lebih lama (8.1) masih dapat membuka file proyek. Bantuan apa pun akan sangat dihargai.

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

1
Bagi saya ... menghapus konten Data Berasal berfungsi!
Jayprakash Dubey

@JayprakashDubey Ini akan berfungsi sampai Anda menekan Find Navigator beberapa kali dan kemudian akan crash lagi, dan Anda harus membersihkan data yang diturunkan lagi dan seterusnya ... Rilis yang sangat kereta.
Angin puyuh

Jawaban:


19

Oke, saya berhasil memperbaiki masalah ini dengan menghapus direktori .xcworkspace saya dan membuatnya kembali via pod install. Xcode terbuka dan saya dapat membangun proyek saya.

Sunting : Seperti yang disarankan orang lain solusi yang lebih baik adalah menghapus direktori xcuserdata dari dalam .xcworkspace. Ini lebih cepat karena Anda tidak perlu menjalankan ulang pemasangan pod setiap saat.


5
Saya juga bisa "memperbaiki" masalah (setelah dipaksa menjadi pembaruan xcode) dengan membuka direktori .xcworkspace (tampilkan konten pakcage) dan kemudian menyingkirkan folder xcuserdata.
Lukasz 'Severiaan' Grela

Lukasz 'Severiaan' Grela, terima kasih atas jawaban Anda. Itu memecahkan masalah saya.
ZevsVU

13

Jawaban yang benar adalah dari komentar Lukasz :

  1. Klik kanan pada file .xcworkspace> Tampilkan Isi Paket
  2. Hapus yang xcuserdatafolder

Dan sekarang Xcode akan membuka ruang kerja proyek dengan baik.


Ini sama dengan jawaban @Eric
Jayprakash Dubey

1
@ Jayprakash Dia mengedit jawabannya langsung setelah saya menambahkan jawaban ini. Hasil editnya adalah pada 20: 17: 4 UTC dan jawaban ini diposting pada 19:52:17 UTC.
ChrisJF

Ini mungkin berhasil juga. Tetapi jika masalah kembali kembali setelah beberapa waktu (kebanyakan saat menggunakan Find Navigator).
Angin puyuh

Saya pikir Anda membutuhkan poin ke-3: 3. Jalankan pod install / update. Terima kasih
Jordan Montel

Metode ini berfungsi. Saya mencoba me-restart seluruh MacOS, tetapi tidak berhasil.
AechoLiu

6

Untuk orang lain yang mengalami masalah serupa, tetapi ini hanya terjadi ketika Find Navigator di-toggle di area navigator. Coba klik pada Project Navigator atau CMD + 1berulang kali saat diluncurkan. Kedengarannya lucu tapi berhasil.


FYI, mungkin gagal beberapa kali pertama.
funct7

Ya, agak lucu, tapi kebanyakan sedih. Saya memiliki masalah yang sama dan jika saya tidak menggunakan Find Navigator, itu tidak crash sama sekali. Sayangnya, versi Xcode ini menyebalkan.
Angin puyuh

1

Selain menghapus xcuserdatafolder di direktori ruang kerja proyek, saya juga dapat memperbaiki kerusakan khusus ini dengan menghapus data turunan (baik untuk proyek yang terbuka saat Xcode macet, atau untuk semua proyek) di ~/Library/Developer/Xcode/DerivedData. Terakhir kali Xcode mogok saya harus melakukan kedua hal untuk dapat memulai Xcode lagi, jadi saya pikir menghapus keduanya adalah taruhan Anda yang paling aman (setidaknya untuk saat ini).


0
  • ya menghapus xcuserdata membantu.
  • Saya dulu menghapus Data Berasal tetapi kemudian akan crash lagi segera pada Reopen jika saya mencoba melakukan apa pun sebelum pengindeksan selesai lagi.
  • Saya perhatikan bahwa itu hanya terjadi pada proyek pribadi yang saya edit di rumah dan di tempat kerja.
  • Nama pengguna berbeda pada keduanya jadi saya berakhir dengan 2 entri pengguna di xcuserdata nama pengguna saya dan info masuk saya.
  • Saya perhatikan bahwa keduanya memiliki Breakpoints.
  • Dan kesalahan yang dilemparkan adalah _IDENavigatorOutlineViewDataSource jadi sesuatu pada panel samping LHS di Xcode?
  • Bisakah Anda menambahkan .ignore untuk xcuserdata tanpa mengacaukan ruang kerja?

masukkan deskripsi gambar di sini

Dengan menggunakan situs kami, Anda mengakui telah membaca dan memahami Kebijakan Cookie dan Kebijakan Privasi kami.
Licensed under cc by-sa 3.0 with attribution required.