• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CoreData -- addPersistentStoreWithType crashing [solved]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreData -- addPersistentStoreWithType crashing [solved]


  • Subject: Re: CoreData -- addPersistentStoreWithType crashing [solved]
  • From: Ben Lachman <email@hidden>
  • Date: Wed, 10 Dec 2008 23:06:05 -0500

This was exactly the problem. It should be in the CoreData docs, or better yet caught by the MOM compiler (I suppose GCC/LLVM can't really catch this sort of thing since these are properly formed ObjC classes). Anyway, I spent a ton of time debugging this for it really just being a syntax error.

Thanks a bunch!
--
Ben Lachman
Acacia Tree Software

http://acaciatreesoftware.com

email: email@hidden
twitter: @benlachman
mobile: 740.590.0009

On Dec 10, 2008, at 8:08 AM, John Pannell wrote:

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


References: 
 >CoreData -- addPersistentStoreWithType crashing (From: Ben Lachman <email@hidden>)
 >Re: CoreData -- addPersistentStoreWithType crashing (From: John Pannell <email@hidden>)

  • Prev by Date: Undo for non-document based applications
  • Next by Date: Re: Setting A Background Image On A Window
  • Previous by thread: Re: CoreData -- addPersistentStoreWithType crashing
  • Next by thread: Re: CoreData -- addPersistentStoreWithType crashing
  • Index(es):
    • Date
    • Thread