Reputation: 4887
I attempt to access a float value of a NSManagedObject using
float f = [managedObject.price floatValue];
and get the following error. I thought this error was caused when an object was deleted and you try to manipulate it. I do not update nor delete any properties of the original object. Is there any other reason this error would occur?
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 postNotificationName:object: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 postNotificationName:object: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
)
Upvotes: 2
Views: 4743
Reputation: 64428
You can get the error if something happens with the persistent store e.g. you remove the store from the persistent store manager used by the context.
Most likely, however, the managed object has been deleted but you have retained a reference to it elsewhere.
Upvotes: 4