我尝试使用 NSManagedObject 访问浮点值
float f = [managedObject.price floatValue];
并得到以下错误。我认为这个错误是当一个对象被删除并且你试图操纵它时引起的。我不更新也不删除原始对象的任何属性。是否还有其他原因会发生此错误?
2011-07-29 13:02:54.797 AEsir[3760:707] *** Terminating app due to uncaught exception 'NSObjectInaccessibleException', reason: 'CoreData could not fulfill a fault for '0x6095d20 <x-coredata://6483BA33-F9AD-436C-91CB-0EE6E07F2FBE/Venue/p7>''
*** Call stack at first throw:
(
0 CoreFoundation 0x35c6464f __exceptionPreprocess + 114
1 libobjc.A.dylib 0x31cb9c5d objc_exception_throw + 24
2 CoreData 0x30a51e99 _PFFaultHandlerLookupRow + 1244
3 CoreData 0x30aa69c1 -[NSFaultHandler fulfillFault:withContext:] + 20
4 CoreData 0x30aa5789 _PF_FulfillDeferredFault + 360
5 CoreData 0x30a50f1f _sharedIMPL_pvfk_core + 58
6 CoreData 0x30ab481b _pvfk_16 + 10
7 AEsir 0x0000b641 -[VenueListViewController transactionSucceeded:] + 240
8 Foundation 0x35f31183 _nsnote_callback + 142
9 CoreFoundation 0x35c3320f __CFXNotificationPost_old + 402
10 CoreFoundation 0x35bcdeeb _CFXNotificationPostNotification + 118
11 Foundation 0x35f2e5d3 -[NSNotificationCenter postNotificationNamebject:userInfo:] + 70
12 AEsir 0x00036c67 -[CreditManager finishTransaction:wasSuccessful:] + 170
13 AEsir 0x00036d4b -[CreditManager completeTransaction:] + 106
14 AEsir 0x00036ffb -[CreditManager paymentQueue:updatedTransactions:] + 246
15 StoreKit 0x35970da9 __NotifyObserverAboutChanges + 44
16 CoreFoundation 0x35bcc3c5 CFArrayApplyFunction + 40
17 StoreKit 0x359727f1 -[SKPaymentQueue _notifyObserversAboutChanges:] + 92
18 StoreKit 0x35972351 -[SKPaymentQueue _processUpdates:trimUnmatched:] + 860
19 StoreKit 0x35971137 -[SKPaymentQueue _transactionUpdatedNotification:] + 98
20 Foundation 0x35f31183 _nsnote_callback + 142
21 CoreFoundation 0x35c3320f __CFXNotificationPost_old + 402
22 CoreFoundation 0x35bcdeeb _CFXNotificationPostNotification + 118
23 Foundation 0x35f2e5d3 -[NSNotificationCenter postNotificationNamebject:userInfo:] + 70
24 AppSupport 0x35272455 -[CPDistributedNotificationCenter deliverNotification:userInfo:] + 44
25 AppSupport 0x35273781 _CPDNDeliverNotification + 204
26 AppSupport 0x352721d7 _XDeliverNotification + 122
27 AppSupport 0x35268dd7 migHelperRecievePortCallout + 138
28 CoreFoundation 0x35c3ba97 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 26
29 CoreFoundation 0x35c3d83f __CFRunLoopDoSource1 + 166
30 CoreFoundation 0x35c3e60d __CFRunLoopRun + 520
31 CoreFoundation 0x35bceec3 CFRunLoopRunSpecific + 230
32 CoreFoundation 0x35bcedcb CFRunLoopRunInMode + 58
33 GraphicsServices 0x30b5d41f GSEventRunModal + 114
34 GraphicsServices 0x30b5d4cb GSEventRun + 62
35 UIKit 0x30dd9d69 -[UIApplication _run] + 404
36 UIKit 0x30dd7807 UIApplicationMain + 670
37 AEsir 0x00008093 main + 70
38 AEsir 0x00002d8c start + 52
)
如果持久性存储发生某些问题,您可能会收到错误消息,例如您从上下文使用的持久存储管理器中删除存储。
不过,很可能托管对象已被删除,但您在别处保留了对它的引用。
关于ios - CoreData 无法解决未修改对象发生的错误。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6876605/
欢迎光临 OStack程序员社区-中国程序员成长平台 (https://ostack.cn/) | Powered by Discuz! X3.4 |