• 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: Core Data Persistent Store Corrupted
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data Persistent Store Corrupted


  • Subject: Re: Core Data Persistent Store Corrupted
  • From: Vladislav Struhar <email@hidden>
  • Date: Sat, 20 Jun 2009 15:31:05 +0200

Actually I took a look at the file with HexEdit, that the file is really corrupted! The header was different than the one from good file!

Now how can this happen with saving managed object contex? I'm always saving in main thread...

The only thing I've found in my code, is that I missed two inverse relationships. But could this be the reason of file corruption?

Thanks,
Vlado

Sent from my iPhone

On 20.6.2009, at 14:43, Jerry Krinock <email@hidden> wrote:


On 2009 Jun 17, at 05:43, Vladislav Struhar wrote:

I'm using Core Data model with NSBinaryStoreType persistent store.

Wow. I've never seen that actually used in real life.

After a long time of using this with no issues, I have encountered an error:

"The file could not be opened because it is not in the right format."

File is about 1MB size. Do you know what might be the cause of this? Is there a way to check/repair persistent store file?

No, but I can advise you to remember that NSErrors like that are generated in response to an unexpected event, and if the unexpected event was an "unknown unknown" to the person who wrote the code generating the NSError, the root cause may not be what it says.


I've definitely seen that happen with the message you quoted above. If I recall correctly, Core Data not finding your managed object model is one of them. So, take a broader look, beyond just that file.

Also, if you are only seeing that message in a sheet in a window, you're not getting all of the information. Intercept the NSError by overriding -willPresentError:, and NSLog its entire userInfo dictionary.

_______________________________________________

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
_______________________________________________

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: 
 >Core Data Persistent Store Corrupted (From: Vladislav Struhar <email@hidden>)
 >Re: Core Data Persistent Store Corrupted (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: Core Data Persistent Store Corrupted
  • Next by Date: Re: my drawer won't close
  • Previous by thread: Re: Core Data Persistent Store Corrupted
  • Next by thread: Jerky/juttery (core-)animation in a screensaver
  • Index(es):
    • Date
    • Thread