Skip to content

Dangling reference to an invalid object in iOS 4.3 #139

Closed
aprunedamtz opened this Issue Feb 10, 2012 · 3 comments

3 participants

@aprunedamtz

I'm getting this error message constantly when running the app with iOS 4.3 simulator. Using iOS 5 everything works perfect. I'm attaching some console output. As you can see, one object seems to have 2 different relationships to the same object

2012-02-09 18:48:01.738 Respond[70769:b603] +NSManagedObjectContext(MagicalRecord) MR_contextThatNotifiesDefaultContextOnMainThread Creating Context - Using Thread Isolation Mode
2012-02-09 18:48:01.739 Respond[70769:b603] +NSManagedObjectContext(MagicalRecord) MR_contextWithStoreCoordinator: Creating MOContext *** On Main Thread ***
2012-02-09 18:48:01.740 Respond[70769:b603] +NSManagedObjectContext(MagicalRecord) MR_contextWithStoreCoordinator: Creating context in Thread Isolation Mode
2012-02-09 18:48:07.135 Respond[70769:b603] -NSManagedObjectContext(MagicalRecord) MR_saveWithErrorHandler: Saving *** Default *** Context *** on Main Thread ***
2012-02-09 18:48:07.139 Respond[70769:b603] +MagicalRecordHelpers defaultErrorHandler: Error: (entity: Tag; id: 0x5d9a7d0 x-coredata://0F2FAE2E-9341-4CFC-BD98-F555957B41AF/Tag/p12 ; data: {
name = AAA;
questions = (
"0x5da0190 x-coredata://0F2FAE2E-9341-4CFC-BD98-F555957B41AF/Question/p5",
"0x5da0180 x-coredata://0F2FAE2E-9341-4CFC-BD98-F555957B41AF/Question/p4",
"0x5da0190 x-coredata://0F2FAE2E-9341-4CFC-BD98-F555957B41AF/Question/p5"
);
})
2012-02-09 18:48:07.140 Respond[70769:b603] +MagicalRecordHelpers defaultErrorHandler: Error Details: (entity: Question; id: 0x5da0190 x-coredata://0F2FAE2E-9341-4CFC-BD98-F555957B41AF/Question/p5 ; data: )
2012-02-09 18:48:07.141 Respond[70769:b603] +MagicalRecordHelpers defaultErrorHandler: Error:
2012-02-09 18:48:07.142 Respond[70769:b603] +MagicalRecordHelpers defaultErrorHandler: Error: questions
2012-02-09 18:48:07.142 Respond[70769:b603] +MagicalRecordHelpers defaultErrorHandler: Error: The operation couldn’t be completed. (Cocoa error 1550.)

@casademora
Magical Panda Software member

A quick search on stackoverlflow gets this question:
http://stackoverflow.com/questions/2003648/coredata-dangling-reference-to-an-invalid-object-error

While I think your code is the same on both platforms, perhaps the fact that iOS4 runs in a completely different mode as iOS5 is just a fundamental problem. I've tried to isolate this and make it work on both, but it's a tough thing to do, and I'm leaning toward making things solidly work on iOS5 ...

@aprunedamtz

Yes, there are big differences between iOS4 and iOS5. I managed to solve this particular problem anyway, I just asked about iOS version in code, and take different ways depending on the result. Thanks for your answer =)

@chrisnoisel

Then, why not sharing what is this change between iOS4 and 5 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.