CoreData could not fulfill a fault after Save As
CoreData could not fulfill a fault after Save As
- Subject: CoreData could not fulfill a fault after Save As
- From: Jim Thomason <email@hidden>
- Date: Wed, 14 Oct 2009 12:13:31 -0500
I'm completely and utterly stumped. I've stumbled across a showstopper
bug and could use some pointers to try and debug it. Unfortuately, I
haven't been able to reduce it into a succinct demo app. So clearly,
the error is elsewhere in my code, but I can't figure out how to track
it down yet.
The short description is this - I have a document based CoreData app.
I can carefully craft a set of data. I then open the document, select
a particular record, and do a Save As. This works fine. But when I
select a second record, I get errors that CoreData could not fulfill a
fault. If I quit the app and re-launch it, I can operate on the copy I
just saved w/o issue, so apparently the data is there. I haven't a
clue what the problem is.
I'll try to explain in more detail.
Let's say that I have a group of machines. It doesn't matter what they
produce, just that they make something. Each machine can have multiple
operators, and each operator submits a job into the machine to use it
to produce whatever it makes.
The app just keeps track of that - for this machine, these operators
submitted those jobs. Nothing else.
Here's what happens - create a new document. This will automatically
create a single machine for you, since you need at least one.
Add two operators to it, Fred and Bob. Log that Bob submitted a job
("Make widgets").
Next, select Fred in the interface, and quit the app. Re-launch it and
re-open the document. It keeps track of the last operator selected, so
that one's selected in the interface. Note that Fred has not submitted
any jobs.
Next, do a save as on the document, and put it anywhere. The save
succeeds. Now, when I try to click on Bob to view his jobs, I get an
error that CoreData could not fulfill a fault. Some further research
indicated that the job record is actually there ("Make widgets"). The
problem is when the job record tries to access its operator. -That-
causes the 'could not fulfill a fault' error.
So I can see Bob in the interface, it's just when I click on him that
it tries to load his orders into another table. For display purposes,
that table also populates the name of the job's operator, and that's
where the thing blows up.
If I quit the app and re-open the document, I can select Bob and view
his jobs without complaint.
Further, if before I do the Save As, I select Bob, or otherwise view
him in any way, the error does not occur. I can do the Save As and
then re-select Bob without issue. It's only when Bob's orders haven't
been viewed in the original document that it breaks.
Inspection on the job entry shows that both the job and its operator
record both exist in the same managedObjectContext, which is the one
newly created for the document. Further, as best as I can tell, they
are newly created objects.
And I am also completely and utterly stumped as to what's causing this.
I know I haven't provided much info in terms of what the code's doing,
and I'm sure the problem is elsewhere, I just can't find it. Does
anyone have any ideas for what I can do to debug this issue and track
down the root cause? I've just been grasping at straws. Any pointers
for what I should look for, potential sources of this issue, or useful
methods to break on would be greatly appreciated.
Many thanks,
-Jim....
_______________________________________________
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