ios - 由于未捕获的异常 'NSObjectInaccessibleException' 而终止应用程序,原因 : 'CoreData could not fulfill a fault

标签 ios core-data

我只是遇到了这个错误,我在堆栈溢出上搜索了一个答案,但所有的答案都是模棱两可的,我只是想知道这个堆栈的行在哪里,它表明我有一个错误,我到底应该怎么做解决这个问题 ?

*** Terminating app due to uncaught exception 'NSObjectInaccessibleException', reason: 'CoreData could not fulfill a fault for '0xd000000000080000 <x-coredata://53C0FD28-C56A-4608-A320-05A841464DBD/Site/p2>''
*** First throw call stack:
(
    0   CoreFoundation                      0x0000000103ca3c65 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x0000000102db2bb7 objc_exception_throw + 45
    2   CoreData                            0x0000000102a261fd _PFFaultHandlerLookupRow + 1949
    3   CoreData                            0x0000000102a25659 _PF_FulfillDeferredFault + 265
    4   CoreData                            0x0000000102a25437 _sharedIMPL_pvfk_core + 103
    5   CoreData                            0x0000000102a58513 _PF_Handler_Public_GetProperty + 163
    6   Foundation                          0x0000000102333914 -[NSArray(NSKeyValueCoding) valueForKey:] + 437
    7   CoreData                            0x0000000102a8e5af -[_PFBatchFaultingArray valueForKey:] + 79
    8   Foundation                          0x00000001023ada63 -[NSArray(NSKeyValueCoding) valueForKeyPath:] + 435
    9   CoreData                            0x0000000102a8e61f -[_PFBatchFaultingArray valueForKeyPath:] + 79
    10  CoreData                            0x0000000102b21ba1 __43-[NSFetchedResultsController performFetch:]_block_invoke + 481
    11  CoreData                            0x0000000102aefc30 gutsOfBlockToNSPersistentStoreCoordinatorPerform + 192
    12  libdispatch.dylib                   0x000000010489e614 _dispatch_client_callout + 8
    13  libdispatch.dylib                   0x0000000104884002 _dispatch_barrier_sync_f_invoke + 365
    14  CoreData                            0x0000000102adfec6 -[NSPersistentStoreCoordinator performBlockAndWait:] + 198
    15  CoreData                            0x0000000102b218dc -[NSFetchedResultsController performFetch:] + 572
    16  OptiChantier                        0x0000000100627930 -[HEQSiteListViewController_iPhone fetchedResultsController] + 720
    17  OptiChantier                        0x00000001006253ca -[HEQSiteListViewController_iPhone numberOfSectionsInTableView:] + 58
    18  UIKit                               0x0000000101357bbe -[_UIFilteredDataSource numberOfSectionsInTableView:] + 112
    19  UIKit                               0x00000001012ceac3 -[UITableViewRowData _updateNumSections] + 84
    20  UIKit                               0x00000001012cf4b4 -[UITableViewRowData invalidateAllSections] + 69
    21  UIKit                               0x000000010111a73b -[UITableView _updateRowData] + 217
    22  UIKit                               0x000000010113b4a5 -[UITableView _rebuildGeometry] + 27
    23  UIKit                               0x0000000101139c12 -[UITableView setLayoutMargins:] + 378
    24  UIKit                               0x0000000101139a5f -[UITableView _setDefaultLayoutMargins:] + 134
    25  UIKit                               0x000000010116cac5 -[UIViewController _setContentOverlayInsets:] + 317
    26  UIKit                               0x000000010116d3f6 -[UIViewController _updateContentOverlayInsetsFromParentIfNecessary] + 1857
    27  UIKit                               0x000000010116cb35 -[UIViewController _updateContentOverlayInsetsForSelfAndChildren] + 101
    28  UIKit                               0x0000000101174db8 -[UIViewController _updateLayoutForStatusBarAndInterfaceOrientation] + 746
    29  UIKit                               0x0000000101178a9b -[UIViewController viewDidMoveToWindow:shouldAppearOrDisappear:] + 873
    30  UIKit                               0x00000001010bd9c5 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1397
    31  UIKit                               0x00000001010cf48b -[UIScrollView _didMoveFromWindow:toWindow:] + 55
    32  UIKit                               0x00000001010bd70a -[UIView(Internal) _didMoveFromWindow:toWindow:] + 698
    33  UIKit                               0x00000001010b5e8f __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 125
    34  UIKit                               0x00000001010b5e03 -[UIView(Hierarchy) _postMovedFromSuperview:] + 437
    35  UIKit                               0x00000001010bff08 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1660
    36  UIKit                               0x00000001013a680c -[UINavigationTransitionView transition:fromView:toView:] + 479
    37  UIKit                               0x00000001011a4170 -[UINavigationController _startTransition:fromViewController:toViewController:] + 2984
    38  UIKit                               0x00000001011a4408 -[UINavigationController _startDeferredTransitionIfNeeded:] + 523
    39  UIKit                               0x00000001011a4ece -[UINavigationController __viewWillLayoutSubviews] + 43
    40  UIKit                               0x00000001012ef6d5 -[UILayoutContainerView layoutSubviews] + 202
    41  UIKit                               0x00000001010c29eb -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 536
    42  QuartzCore                          0x00000001070b7ed2 -[CALayer layoutSublayers] + 146
    43  QuartzCore                          0x00000001070ac6e6 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
    44  QuartzCore                          0x00000001070ac556 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
    45  QuartzCore                          0x000000010701886e _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 242
    46  QuartzCore                          0x0000000107019a22 _ZN2CA11Transaction6commitEv + 462
    47  QuartzCore                          0x000000010701a0d3 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 89
    48  CoreFoundation                      0x0000000103bd6ca7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
    49  CoreFoundation                      0x0000000103bd6c00 __CFRunLoopDoObservers + 368
    50  CoreFoundation                      0x0000000103bcca33 __CFRunLoopRun + 1123
    51  CoreFoundation                      0x0000000103bcc366 CFRunLoopRunSpecific + 470
    52  GraphicsServices                    0x0000000103afba3e GSEventRunModal + 161
    53  UIKit                               0x00000001010428c0 UIApplicationMain + 1282
    54  OptiChantier                        0x00000001005bff6f main + 111
    55  libdyld.dylib                       0x00000001048d2145 start + 1
    56  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type _NSCoreDataException
(lldb) 

最佳答案

问题的发生仅仅是因为:“Core Data 试图实现的对象已从持久存储中删除”。您可以在核心数据编程指南中阅读更多相关信息 here在“故障无法实现”部分下。

关于ios - 由于未捕获的异常 'NSObjectInaccessibleException' 而终止应用程序,原因 : 'CoreData could not fulfill a fault,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33363094/

相关文章:

ios - 如何实现发布方法?

ios - 与他人共享/邀请 CoreData iCloud 文档

ios - 来自不同上下文的对象,即使它们不是

iphone - 核心数据 : Light-weight migration from xcdatamodel version n to n+5

ios - 递增解析对象中的字段。结果 : TypeError: Object [object Object] has no method 'Increment'

javascript - 在 react-native 中自动化应用程序图标/启动画面链接(可能使用 rnpm)?

ios - 如何禁用 "named colours can only be accessed from an Asset Catalog in iOS 11.0 and later"警告?

ios - iOS企业帐户限制

ios - 已插入但尚未保存的 NSManagedObject?

ios - NSFetchedResultsController "cannot access fetched objects before -performFetch:"调用 objectAtIndexPath : 时崩溃