Well, that was quick. With NSZombieEnabled, I get this when
deallocating my context:
*** -[VetVisit_VetVisit_ _hasRetainedStoreResources]: message sent to
deallocated instance 0x16b85600
VetVisit is class that represents an Entity in my object model - the
Pet entity has a collection of VetVisit
*Sigh*
All this effort, and it turns out to be a one-line fix. Obviously.
[NSManagedObjectContext -setRetainsRegisteredObjects:YES]
Calling that on the context solves all the problems I was having, and
everything works perfectly now!
Thanks,
-- Daniel
___
dan...@
Thank you again for your helpful replies!
On a different note, when you comment out the "for (VetVisit" code,
does it still crash on a VetVisit, or does it crash on a
"Medication" object?
It still crashes on a VetVisit object.
I don't think I've solved the problem, but I have stopped it
On May 1, 2009, at 2:24 AM, Daniel Kennett wrote:
Thanks for your reply. Yes, I have code that triggers relationship
faults, and removing that code solves the problem. However, I need
that code to work! :-)
When fetching the data from the object tree, I call a method on the
pet instance c
On May 4, 2009, at 11:59 AM, Alexander Spohr wrote:
You are still having the same error.
Although the advice is sound, the premise is false.
All your objects in the relationships are fetched. Therefore they
are owned by the NSManagedObjectContext. You kill the
NSManagedObjectContext by re
You are still having the same error.
All your objects in the relationships are fetched. Therefore they are
owned by the NSManagedObjectContext. You kill the
NSManagedObjectContext by releasing it. After that point you are not
allowed to touch any of its fetched objects. But you hand them ou
Good morning all,
Thanks for your reply. Yes, I have code that triggers relationship
faults, and removing that code solves the problem. However, I need
that code to work! :-)
When fetching the data from the object tree, I call a method on the
pet instance called -pertinentActions. This me
On Apr 30, 2009, at 10:55 AM, Daniel Kennett wrote:
Hi again,
Well, that was quick. With NSZombieEnabled, I get this when
deallocating my context:
*** -[VetVisit_VetVisit_ _hasRetainedStoreResources]: message sent
to deallocated instance 0x16b85600
VetVisit is class that represents an
Hi again,
Well, that was quick. With NSZombieEnabled, I get this when
deallocating my context:
*** -[VetVisit_VetVisit_ _hasRetainedStoreResources]: message sent to
deallocated instance 0x16b85600
VetVisit is class that represents an Entity in my object model - the
Pet entity has a coll
Thank you to you and Keary for your reply.
This is what the // copy out some data code does:
NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
[dict setValue:[[[pet valueForKey:@"name"] copy] autorelease]
forKey:@"name"];
[dict setValue:[[[pet valueForKey:@"birthday"] copy] auto
Daniel,
You are trying to fetch an object and keep it - but you want to
ignore / throw away the NSManagedObjectContext. This will never work.
The NSManagedObjectContext keeps the object. Your Pet can not exist
without its NSManagedObjectContext.
You should let the caller provide a NSManag
On Apr 29, 2009, at 2:59 AM, Daniel Kennett wrote:
Different combinations of trying to do this right result in crashes
at different points. Leaving out [context reset] and just releasing
it obviously gives EXC_BAD_ACCESS again. Autoreleasing the MOC in
+petAtURL: causes crashes when the aut
12 matches
Mail list logo