Parse.com iOS SDK error - "Exception occurred: unable to save PFObject with relation to loop."

I am trying to save a PFObject instance using the iOS SDK, but when I call the save method, I get the following error and the application crashes:

"Exception: unable to save PFObject with relation to loop.

Is it possible to get more details on what this means, or which part of the PFObject is calling it?

The object in question is a fairly complex graphics object and I have been trying to debug the problem for hours with no luck.

EDIT:

So I finally figured out the root cause of the problem.

In different places in the object graph for the PFObject that I was trying to save, there were several different PFObject views of another object. For one of these instances, the objectId was not set. After the fix, the entire PFObject graph was saved without issue.

Not sure yet what the "relation to loop" error message meant in this case, so an explanation for this is still appreciated.

This isn't the first time I've stumbled upon a very generic error message from the Parse SDK, so I really hope Parse.com will improve the level of verbosity of error messages in the future. Just knowing the type of the offending object would save me debugging in this case.

+3


source to share





All Articles