I have a problem with core data that is crashing my app. This happens when i'm trying to add a object to a relationship.
HOMUser *artist = [HOMUser GetUserWithDictionary:artistDict inContext:context];
[self addMArtistsObject:artist];
* Terminating app due to uncaught exception 'NSRangeException', reason: '* -[__NSArrayM objectAtIndex:]: index 25 beyond bounds [0 .. 24]'
The number 25 represents how many entities are in Core Data Model. This is the call stack. It goes far into the framework so i cannot debug a lot. This didn't happened since always. I've checked and rechecked the Core Data Model. Does anybody have a ideea about what can be wrong?
0 CoreFoundation 0x02c0e02e __exceptionPreprocess + 206
1 libobjc.A.dylib 0x02a33e7e objc_exception_throw + 44
2 CoreFoundation 0x02bb00b4 -[__NSArrayM objectAtIndex:] + 196
3 CoreData 0x0122ee2a -[NSManagedObject(_NSInternalMethods) _includeObject:intoPropertyWithKey:andIndex:] + 90
4 CoreData 0x0122ed0e -[NSManagedObject(_NSInternalMethods) _maintainInverseRelationship:forProperty:oldDestination:newDestination:] + 590
5 CoreData 0x0122fcb1 -[NSManagedObject(_NSInternalMethods) _maintainInverseRelationship:forProperty:forChange:onSet:] + 273
6 CoreData 0x0122e956 -[NSManagedObject(_NSInternalMethods) _didChangeValue:forRelationship:named:withInverse:] + 1878
7 CoreData 0x0122e1f0 -[NSManagedObjectContext observeValueForKeyPath:ofObject:change:context:] + 400
8 Foundation 0x021a6ce7 NSKeyValueNotifyObserver + 357
9 Foundation 0x021c03f4 NSKeyValueDidChange + 456
10 Foundation 0x022239c3 -[NSObject(NSKeyValueObserverNotification) didChangeValueForKey:withSetMutation:usingObjects:] + 131
11 CoreData 0x0122fb58 _PF_ManagedObject_DidChangeValueForKeywithSetMutation + 72
12 CoreData 0x012a77e6 _sharedIMPL_addObjectToSet_core + 310
13 ??? 0x0bcf1379 0x0 + 198120313
14 Product Name 0x000acb39 -[HOMEvent initWithTitle:withArtist:withPlace:withWhen:withDescription:andWithOptionsLink:andWithLinkWith:andWithFriends:insertIntoContext:] + 1161
15 Product Name 0x002315a3 -[HOMAddEventVCViewController postPressed:] + 8771
16 libobjc.A.dylib 0x02a47705 -[NSObject performSelector:withObject:withObject:] + 77
17 UIKit 0x016b7920 -[UIApplication sendAction:to:from:forEvent:] + 96
18 UIKit 0x016b78b8 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
19 UIKit 0x01778671 -[UIControl sendAction:to:forEvent:] + 66
20 UIKit 0x01778bcf -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 578
21 UIKit 0x01777d38 -[UIControl touchesEnded:withEvent:] + 546
22 UIKit 0x0197b213 _UIGestureRecognizerUpdate + 7407
23 CoreFoundation 0x02bd6afe __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
24 CoreFoundation 0x02bd6a3d __CFRunLoopDoObservers + 381
25 CoreFoundation 0x02bb47c2 __CFRunLoopRun + 1106
26 CoreFoundation 0x02bb3f44 CFRunLoopRunSpecific + 276
27 CoreFoundation 0x02bb3e1b CFRunLoopRunInMode + 123
28 GraphicsServices 0x038247e3 GSEventRunModal + 88
29 GraphicsServices 0x03824668 GSEventRun + 104
30 UIKit 0x016b465c UIApplicationMain + 1211
Related
I'm facing a strange CoreData related crash.
I'm using RestKit2 which has parent-child relationship between mainMOC and persistentMOC.
What seems to cause the crash (but hardly reproducable) is to store a new entity into CoreData (using mainMOC) and later try to retrieve object having relationship with previously stored entity (again using main MOC).
Stack trace doesn't contain any indication that it's coming from my code. Seems something fishy in merging the two contexts.
Crash happens on both iOS7 and iOS8 and on both Device and Simulator.
Does someone have experience with this?
2014-10-15 11:25:56.208 MyApplication[77240:14758953] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'The left hand side for an ALL or ANY operator must be either an NSArray or an NSSet.'
*** First throw call stack:
(
0 CoreFoundation 0x04e97df6 __exceptionPreprocess + 182
1 libobjc.A.dylib 0x04b21a97 objc_exception_throw + 44
2 Foundation 0x04179816 -[NSEqualityPredicateOperator performPrimitiveOperationUsingObject:andObject:] + 0
3 Foundation 0x04178b05 -[NSComparisonPredicate evaluateWithObject:substitutionVariables:] + 345
4 Foundation 0x0426e387 -[NSSubqueryExpression expressionValueWithObject:context:] + 627
5 Foundation 0x04178c8c -[NSFunctionExpression expressionValueWithObject:context:] + 231
6 Foundation 0x04178aa2 -[NSComparisonPredicate evaluateWithObject:substitutionVariables:] + 246
7 Foundation 0x041a9776 -[NSCompoundPredicateOperator evaluatePredicates:withObject:substitutionVariables:] + 254
8 Foundation 0x041a95ec -[NSCompoundPredicate evaluateWithObject:substitutionVariables:] + 292
9 Foundation 0x041a9776 -[NSCompoundPredicateOperator evaluatePredicates:withObject:substitutionVariables:] + 254
10 Foundation 0x041a95ec -[NSCompoundPredicate evaluateWithObject:substitutionVariables:] + 292
11 Foundation 0x041789a4 -[NSPredicate evaluateWithObject:] + 48
12 CoreData 0x048d836d -[NSFetchedResultsController(PrivateMethods) _objectInResults:] + 109
13 CoreData 0x048d9d10 -[NSFetchedResultsController(PrivateMethods) _preprocessUpdatedObjects:insertsInfo:deletesInfo:updatesInfo:sectionsWithDeletes:newSectionNames:treatAsRefreshes:] + 672
14 CoreData 0x048db28a __77-[NSFetchedResultsController(PrivateMethods) _managedObjectContextDidChange:]_block_invoke + 1946
15 CoreData 0x047e8454 developerSubmittedBlockToNSManagedObjectContextPerform + 196
16 CoreData 0x047e8337 -[NSManagedObjectContext performBlockAndWait:] + 231
17 CoreData 0x048daacf -[NSFetchedResultsController(PrivateMethods) _managedObjectContextDidChange:] + 127
18 Foundation 0x0411b929 __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke + 40
19 CoreFoundation 0x04e62974 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
20 CoreFoundation 0x04d5061b _CFXNotificationPost + 3051
21 Foundation 0x0410af26 -[NSNotificationCenter postNotificationName:object:userInfo:] + 98
22 CoreData 0x047c94d3 -[NSManagedObjectContext(_NSInternalNotificationHandling) _postObjectsDidChangeNotificationWithUserInfo:] + 83
23 CoreData 0x0486954f -[NSManagedObjectContext(_NSInternalChangeProcessing) _createAndPostChangeNotification:withDeletions:withUpdates:withRefreshes:] + 367
24 CoreData 0x047c4d78 -[NSManagedObjectContext(_NSInternalChangeProcessing) _postRefreshedObjectsNotificationAndClearList] + 136
25 CoreData 0x047c483b -[NSManagedObjectContext(_NSInternalChangeProcessing) _processRecentChanges:] + 4875
26 CoreData 0x047c3516 -[NSManagedObjectContext processPendingChanges] + 54
27 CoreData 0x047969d7 _performRunLoopAction + 327
28 CoreFoundation 0x04dbafbe __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
29 CoreFoundation 0x04dbaf00 __CFRunLoopDoObservers + 400
30 CoreFoundation 0x04db093a __CFRunLoopRun + 1226
31 CoreFoundation 0x04db01ab CFRunLoopRunSpecific + 443
32 CoreFoundation 0x04daffdb CFRunLoopRunInMode + 123
33 GraphicsServices 0x05e4224f GSEventRunModal + 192
34 GraphicsServices 0x05e4208c GSEventRun + 104
35 UIKit 0x02f56e16 UIApplicationMain + 1526
36 MyApplication 0x000a9e04 main + 164
37 libdyld.dylib 0x06483ac9 start + 1
)
I am doing an application, and when I try to save data from a UIView to Core Data, it throws an error... I have been more than 5 hours trying some different things, but I am unable to repair it.
I don't think it could be that I am saving it in a bad way, because I use the same method on another UIView and it works perfectly. I had only changed some UITextfields...
This is the error:
2014-02-02 18:52:51.937 4Dealrs[3900:70b] CoreData: error: Serious application error. Exception was caught during Core Data change processing. This is usually a bug within an observer of NSManagedObjectContextObjectsDidChangeNotification. [ valueForUndefinedKey:]: this class is not key value coding-compliant for the key . with userInfo {
NSTargetObjectUserInfoKey = ">";
NSUnknownUserInfoKey = "";
}
2014-02-02 18:52:51.940 4Dealrs[3900:70b] * Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ valueForUndefinedKey:]: this class is not key value coding-compliant for the key .'
* First throw call stack:
(
0 CoreFoundation 0x01b9d5e4 exceptionPreprocess + 180
1 libobjc.A.dylib 0x018468b6 objc_exception_throw + 44
2 CoreFoundation 0x01c2d6a1 -[NSException raise] + 17
3 Foundation 0x015078ca -[NSObject(NSKeyValueCoding) valueForUndefinedKey:] + 282
4 Foundation 0x01474921 _NSGetUsingKeyValueGetter + 81
5 Foundation 0x01473f5b -[NSObject(NSKeyValueCoding) valueForKey:] + 260
6 Foundation 0x014d56af -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 321
7 UIKit 0x00b310c5 -[UINibKeyValuePair apply] + 70
8 libobjc.A.dylib 0x018587d2 -[NSObject performSelector:] + 62
9 CoreFoundation 0x01b98b6a -[NSArray makeObjectsPerformSelector:] + 314
10 UIKit 0x00855552 -[UINib instantiateWithOwner:options:] + 1389
11 UIKit 0x00698b4b -[UITableView _dequeueReusableViewOfType:withIdentifier:] + 370
12 UIKit 0x00698e24 -[UITableView dequeueReusableCellWithIdentifier:] + 48
13 UIKit 0x00698e54 -[UITableView dequeueReusableCellWithIdentifier:forIndexPath:] + 43
14 4Dealrs 0x00014b12 -[SDListaClientesViewController tableView:cellForRowAtIndexPath:] + 130
15 UIKit 0x006a361f -[UITableView _createPreparedCellForGlobalRow:withIndexPath:] + 412
16 UIKit 0x006a36f3 -[UITableView _createPreparedCellForGlobalRow:] + 69
17 UIKit 0x008bf112 -[_UITableViewUpdateSupport(Private) _setupAnimationsForNewlyInsertedCells] + 8156
18 UIKit 0x008c85ca -[_UITableViewUpdateSupport _setupAnimations] + 143
19 UIKit 0x0068a4bd -[UITableView _updateWithItems:updateSupport:] + 1898
20 UIKit 0x006858e1 -[UITableView _endCellAnimationsWithContext:] + 13534
21 UIKit 0x00695550 -[UITableView _updateRowsAtIndexPaths:updateAction:withRowAnimation:] + 337
22 UIKit 0x0069558f -[UITableView insertRowsAtIndexPaths:withRowAnimation:] + 55
23 4Dealrs 0x0000d4c7 -[CoreDataTableViewController controller:didChangeObject:atIndexPath:forChangeType:newIndexPath:] + 375
24 CoreData 0x00178df2 -[NSFetchedResultsController(PrivateMethods) _managedObjectContextDidChange:] + 4322
25 Foundation 0x01519bf9 __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke + 40
26 CoreFoundation 0x01bf9524 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER + 20
27 CoreFoundation 0x01b5100b _CFXNotificationPost + 2859
28 Foundation 0x01453951 -[NSNotificationCenter postNotificationName:object:userInfo:] + 98
29 CoreData 0x0007d173 -[NSManagedObjectContext(_NSInternalNotificationHandling) _postObjectsDidChangeNotificationWithUserInfo:] + 83
30 CoreData 0x0011c78f -[NSManagedObjectContext(_NSInternalChangeProcessing) _createAndPostChangeNotification:withDeletions:withUpdates:withRefreshes:] + 367
31 CoreData 0x00078608 -[NSManagedObjectContext(_NSInternalChangeProcessing) _processRecentChanges:] + 2152
32 CoreData 0x00077d99 -[NSManagedObjectContext processPendingChanges] + 41
33 CoreData 0x0004bfe1 _performRunLoopAction + 321
34 CoreFoundation 0x01b654ce CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 30
35 CoreFoundation 0x01b6541f __CFRunLoopDoObservers + 399
36 CoreFoundation 0x01b43344 __CFRunLoopRun + 1076
37 CoreFoundation 0x01b42ac3 CFRunLoopRunSpecific + 467
38 CoreFoundation 0x01b428db CFRunLoopRunInMode + 123
39 GraphicsServices 0x02eb39e2 GSEventRunModal + 192
40 GraphicsServices 0x02eb3809 GSEventRun + 104
41 UIKit 0x005b4d3b UIApplicationMain + 1225
42 4Dealrs 0x0000db7d main + 141
43 libdyld.dylib 0x02b5570d start + 1
44 ??? 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
I have been searching about this error, but I haven't found nothing useful...
Thanks in advance!
From the stack trace it looks like you have a tableViewCell being instantiated from a NIB file and in the NIB you have an outlet setup for one of the fields which does not have a matching property in the .h/.m file. So double check all your outlets in the tableViewCell NIB file.
This happens when I start the application and taps rapidly on the screen while starting. I have no clues in the stacktrace since its all inside the framework. I'm fearing it might have something to do with ReactiveCocoa 2.0.
Error
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<NSConcreteValue 0x40857fe0> valueForUndefinedKey:]: this class is not key value coding-compliant for the key x_60288.'
Stack trace
0 CoreFoundation 0x036c45e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x034478b6 objc_exception_throw + 44
2 CoreFoundation 0x037546a1 -[NSException raise] + 17
3 Foundation 0x015b98ca -[NSObject(NSKeyValueCoding) valueForUndefinedKey:] + 282
4 Foundation 0x01526921 _NSGetUsingKeyValueGetter + 81
5 Foundation 0x01525f5b -[NSObject(NSKeyValueCoding) valueForKey:] + 260
6 Foundation 0x01545a02 -[NSObject(NSKeyValueCoding) valueForKeyPath:] + 321
7 QuartzCore 0x02379bfb CAObject_valueForKeyPath_ + 2797
8 QuartzCore 0x02379ead CAObject_valueForKeyPath + 147
9 QuartzCore 0x0235ff4f -[CALayer valueForKeyPath:] + 24
10 UIKit 0x0262da96 _UIViewLayerAnimationCanBeConsideredFinished + 91
11 UIKit 0x026161c5 __22-[UIWindow sendEvent:]_block_invoke + 36
12 CoreFoundation 0x0374105d __53-[__NSArrayI enumerateObjectsWithOptions:usingBlock:]_block_invoke + 61
13 CoreFoundation 0x03740f92 -[__NSArrayI enumerateObjectsWithOptions:usingBlock:] + 258
14 CoreFoundation 0x036be0a5 -[NSArray enumerateObjectsUsingBlock:] + 53
15 UIKit 0x02615fa3 -[UIWindow sendEvent:] + 751
16 UIKit 0x025e9e86 -[UIApplication sendEvent:] + 242
17 UIKit 0x025d418f _UIApplicationHandleEventQueue + 11421
18 CoreFoundation 0x0364d83f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
19 CoreFoundation 0x0364d1cb __CFRunLoopDoSources0 + 235
20 CoreFoundation 0x0366a29e __CFRunLoopRun + 910
21 CoreFoundation 0x03669ac3 CFRunLoopRunSpecific + 467
22 CoreFoundation 0x036698db CFRunLoopRunInMode + 123
23 GraphicsServices 0x04c729e2 GSEventRunModal + 192
24 GraphicsServices 0x04c72809 GSEventRun + 104
25 UIKit 0x025d6d3b UIApplicationMain + 1225
26 IVYCore 0x00003242 main + 178
27 IVYCore 0x00003185 start + 53
This answer is not a duplicate because
the source is unknown
the key is unknown
caused automatically by the frameworks
no explicit clues
I have created an app that is running great on 5.0 and above but when I test on devices lower I have ran into a few issues that I am unsure of how to tackle and correct.
The first big issue is when saving to core data I use a error method that I believe is apples default error method that is created when you make a core data model. The app just crashes when below 5.0 but if I block out the error code everything works fine. Below is the code used to find and error and handle it.
NSError *error;
if (![managedObjectContext save:&error]) { // crash here
// This is a serious error saying the record could not be saved.
// Advise the user to restart the application
}
//crash log below
2012-05-13 10:17:22.062 PreviewMaker[41595:207] -[UIImage encodeWithCoder:]:
unrecognized selector sent to instance 0x5e7ce80
2012-05-13 10:17:22.064 PreviewMaker[41595:207] *** Terminating app due to uncaught
exception 'NSInvalidArgumentException', reason: '-[UIImage encodeWithCoder:]:
unrecognized selector sent to instance 0x5e7ce80'
*** Call stack at first throw:
(
0 CoreFoundation 0x013fc5a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x0178b313 objc_exception_throw + 44
2 CoreFoundation 0x013fe0bb -[NSObject(NSObject)
doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x0136d966 ___forwarding___ + 966
4 CoreFoundation 0x0136d522 _CF_forwarding_prep_0 + 50
5 Foundation 0x00c45b3e _encodeObject + 1076
6 Foundation 0x00c50f89 +[NSKeyedArchiver
archivedDataWithRootObject:] + 206
7 CoreData 0x01122cb5 -[NSSQLiteConnection execute] +
2677
8 CoreData 0x011771d6 -[NSSQLiteConnection insertRow:]
+ 262
9 CoreData 0x01173e64 -[NSSQLConnection
performAdapterOperations:] + 180
10 CoreData 0x01173b0e -[NSSQLCore
_performChangesWithAdapterOps:] + 494
11 CoreData 0x011725ea -[NSSQLCore performChanges] + 410
12 CoreData 0x0116c038 -[NSSQLCore saveChanges:] + 216
13 CoreData 0x0112a199 -[NSSQLCore
executeRequest:withContext:error:] + 409
14 CoreData 0x011da70b -[NSPersistentStoreCoordinator
executeRequest:withContext:error:] + 3691
15 CoreData 0x01162948 -[NSManagedObjectContext save:] +
712
16 PreviewMaker 0x0000a0c0 -[MainViewController
noUploadJustSaveImage:] + 331
17 PreviewMaker 0x00009d3c -[MainViewController
UserConfirmedToSaveImage] + 756
18 UIKit 0x004774fd -[UIApplication
sendAction:to:from:forEvent:] + 119
19 UIKit 0x00507799 -[UIControl
sendAction:to:forEvent:] + 67
20 UIKit 0x00509c2b -[UIControl(Internal)
_sendActionsForEvents:withEvent:] + 527
21 UIKit 0x005087d8 -[UIControl
touchesEnded:withEvent:] + 458
22 UIKit 0x0049bded -[UIWindow _sendTouchesForEvent:]
+ 567
23 UIKit 0x0047cc37 -[UIApplication sendEvent:] + 447
24 UIKit 0x00481f2e _UIApplicationHandleEvent + 7576
25 GraphicsServices 0x01eb8992 PurpleEventCallback + 1550
26 CoreFoundation 0x013dd944
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
27 CoreFoundation 0x0133dcf7 __CFRunLoopDoSource1 + 215
28 CoreFoundation 0x0133af83 __CFRunLoopRun + 979
29 CoreFoundation 0x0133a840 CFRunLoopRunSpecific + 208
30 CoreFoundation 0x0133a761 CFRunLoopRunInMode + 97
31 GraphicsServices 0x01eb71c4 GSEventRunModal + 217
32 GraphicsServices 0x01eb7289 GSEventRun + 115
33 UIKit 0x00485c93 UIApplicationMain + 1160
34 PreviewMaker 0x00002e07 main + 121
35 PreviewMaker 0x00002d85 start + 53
)
terminate called after throwing an instance of 'NSException'
Another issue I am running into is setting tintColor on UI objects such as the UISwitch. I have a settings controller that has several UISwitches and such which just about all have a tint color set on, but once agin anything below 5.0 crashes. How can I handle the two and not have to re-write the code just to be compatible with devices below 5.0.
shineSwitch = [[[UISwitch alloc] initWithFrame:CGRectZero] autorelease];
[cell.contentView addSubview:shineSwitch];
cell.accessoryView = shineSwitch;
[shineSwitch addTarget:self action:#selector(switchChanged:)
forControlEvents:UIControlEventValueChanged];
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
shineSwitch.onTintColor = [UIColor colorWithRed:0.0 green:0.61 blue:0.99 alpha:1.0];
//crash Log below
2012-05-13 10:19:45.033 PreviewMaker[41611:207] -[UISwitch setOnTintColor:]:
unrecognized selector sent to instance 0x5eab860
2012-05-13 10:19:45.034 PreviewMaker[41611:207] *** Terminating app due to uncaught
exception 'NSInvalidArgumentException', reason: '-[UISwitch setOnTintColor:]:
unrecognized selector sent to instance 0x5eab860'
*** Call stack at first throw:
(
0 CoreFoundation 0x013fc5a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x0178b313 objc_exception_throw + 44
2 CoreFoundation 0x013fe0bb -[NSObject(NSObject)
doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x0136d966 ___forwarding___ + 966
4 CoreFoundation 0x0136d522 _CF_forwarding_prep_0 + 50
5 PreviewMaker 0x0000f6fb -[FlipsideViewController
tableView:cellForRowAtIndexPath:] + 1353
6 UIKit 0x004ecb98 -
[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 634
7 UIKit 0x004e24cc -
[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:] + 75
8 UIKit 0x004f78cc -
[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 1561
9 UIKit 0x004ef90c -[UITableView layoutSubviews] +
242
10 QuartzCore 0x001e2a5a -[CALayer layoutSublayers] + 181
11 QuartzCore 0x001e4ddc CALayerLayoutIfNeeded + 220
12 QuartzCore 0x0018a0b4
_ZN2CA7Context18commit_transactionEPNS_11TransactionE + 310
13 QuartzCore 0x0018b294 _ZN2CA11Transaction6commitEv +
292
14 QuartzCore 0x0018b46d
_ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 99
15 CoreFoundation 0x013dd89b
__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 27
16 CoreFoundation 0x013726e7 __CFRunLoopDoObservers + 295
17 CoreFoundation 0x0133b1d7 __CFRunLoopRun + 1575
18 CoreFoundation 0x0133a840 CFRunLoopRunSpecific + 208
19 CoreFoundation 0x0133a761 CFRunLoopRunInMode + 97
20 GraphicsServices 0x01eb71c4 GSEventRunModal + 217
21 GraphicsServices 0x01eb7289 GSEventRun + 115
22 UIKit 0x00485c93 UIApplicationMain + 1160
23 PreviewMaker 0x00002e07 main + 121
24 PreviewMaker 0x00002d85 start + 53
)
terminate called after throwing an instance of 'NSException'
Any help would be greatly appreciated!
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
)
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.