Re: Changes in CoreData/10.4.3?
Re: Changes in CoreData/10.4.3?
- Subject: Re: Changes in CoreData/10.4.3?
- From: Jesse Grosjean <email@hidden>
- Date: Wed, 2 Nov 2005 22:54:27 -0500
The same error appears when you run the application in 10.4.2.
Justin and all,
Thanks, I guess I didn't reproduce the bug exactly, because my app
ran without trouble on 10.4.2. Anyway, thanks for trying it out, and
I think I've found the fix.
In my application I have a number of NSObjectController subclasses
and I forgot to set the managed object context for one of these
controllers. I didn't think this mattered since I'm not using the
controller to create new objects, but I guess it is important to set
or else the managed object context can be invalidated before the
controller stops observing entities in the managed object context,
and then I see an exception. I'm not sure why this wouldn't have been
a problem prior to 10.4.3, but my app is back to working now.
Jesse
<Picture 1.png>
__________________________________________________
Justin Williams email@hidden
work: www.maczealots.com play: www.carpeaqua.com
On Nov 2, 2005, at 8:29 AM, Jesse Grosjean wrote:
If you notice what appears to be a regression with the new release,
*please file a bug* (<http://bugreport.apple.com/>), *sooner rather
than later*. If you can include a simple, reproducible, test case,
that will help the engineers diagnose and then fix the problem.
It's likely to be something that I'm doing wrong, so I'll post
here first, and will post to bug-reporter if it really is a bug.
I've posted an example project here:
http://www.hogbaysoftware.com/CoreDataTest.zip
It's a little hard to determine if this example is reproducing the
same problem that is now occurring in my application, but they
seem similar. To reproduce the problem run the application and
then close the first open document. You should see an error like
this:
2005-11-02 08:04:18.446 CoreDataTest[13789] *** -
[NSAutoreleasePool dealloc]: Exception ignored while releasing an
object in an autorelease pool: The NSManagedObject with ID:
0x34b840 <x-coredata:///Note/t8F491A16-3DD2-481E-
BD41-4144B80C4659> has been invalidated.
I don't think this was happening on 10.4.2, though I can't be sure
since I no longer have that version. The cause of the problem is
this line:
[textField bind:@"value" toObject:[[self document] note]
withKeyPath:@"noteData.title" options:nil];
The model looks like this:
NoteEntity > to one relationship > NoteDataEntity. And the
NoteDataEntity has a title string attribute.
It seems that the textField isn't being released (and unbinding
it's value) until after the entities in the managed object context
have been invalidated.
Jesse
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40carpeaqua.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden