Re: CoreData -- addPersistentStoreWithType crashing
Re: CoreData -- addPersistentStoreWithType crashing
- Subject: Re: CoreData -- addPersistentStoreWithType crashing
- From: John Pannell <email@hidden>
- Date: Wed, 10 Dec 2008 06:08:07 -0700
Hi Ben-
If you are using a custom class to represent an entity in your model,
you must make sure that it is a subclass of NSManagedObject in your
code (and not NSObject). This might not be your issue, but I have had
this bite me before - it issues the same error with no exception
thrown, and is quite a challenge to debug. I fall into this when
moving fast in model creation, as the template for adding an Objective-
C Class to a project makes it a subclass of NSObject.
Hope this helps!
John
Positive Spin Media
http://www.positivespinmedia.com
On Dec 10, 2008, at 12:58 AM, Ben Lachman wrote:
Hi all:
I've been making some changes to one of my apps which include a
change to the data model. Now whenever I start up the app it
crashes (EXEC_BAD_ACCESS) in
addPersistentStoreWithType:configuration:URL:options:error:. I've
factored out all the passed arguments and it's still crashing. I
figure it must have to do with the change in the model, but I can't
see why that would make it crash and not report an error or trow an
exception, particularly if the URL points to a nonexistent
file )e.g. it will create a new store file). Any thoughts?
Thanks,
->Ben
--
Ben Lachman
Acacia Tree Software
http://acaciatreesoftware.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden