On Dec 24, 2009, at 21:48, Brian Bruinewoud wrote:

> Oh, sorry, here is the message in the Console:
> 
> *** -[NSCFType controllerDidChangeContent:]: unrecognized selector sent to 
> instance 0x3a11d70

You need to pay attention to this first, since it suggests that you have a 
memory management error that's nothing to do with Core Data. Whether or not 
your program *sometimes* runs is irrelevant. If it sometimes crashes, then 
cases where it doesn't crash are just dumb luck.

The error message is telling you that an object that's the delegate of a 
NSFetchedResultsController isn't of the correct class. Such an error is almost 
always an indication of an object that has not been retained sometime in the 
past. (So its memory gets released and reused for another object, hence the 
exception with this error message). Note that delegates are generally not 
retained by the delegating object, so the delegate lifetime must be ensured by 
suitable ownership elsewhere.

If you have code that sets up this delegate, that's the place to look for the 
bug. If not, then this may be a secondary error, but I'd still vote for a 
memory management bug.


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to