Skip to content

Adding a property named state to a PFObject causes a crash #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
natanrolnik opened this issue Aug 16, 2015 · 2 comments
Closed

Adding a property named state to a PFObject causes a crash #26

natanrolnik opened this issue Aug 16, 2015 · 2 comments
Labels
type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@natanrolnik
Copy link
Contributor

As I originally posted here in the Google Forum, if you have a PFObject subclass, where one of the property is named state, Parse will cause a crash, related to PFObjectState trying to set an object that is not a PFObjectState instance.

It was introduced, I guess, in version 1.7 or around that - as it wasn't crashing for me. To fix it temporarily, I needed to replace my property with geographicState instead of state.

To reproduce it, is very simple. One just needs to create a subclass of PFObject, add a property named state (in my case, it was a string), assign it and save.

I hope it's enough information. If not, I can try to reproduce and attach a stack strike.

If this behaviour is expected, that's ok - but it should be documented (maybe I didn't find this in the docs?). But it seems that I'm not the only one, according to the replies in the Google Forum.

@richardjrossiii
Copy link
Contributor

This was an oversight when we refactored PFObject's state, and was fixed in 1.8.0.

@richardjrossiii richardjrossiii added the type:bug Impaired feature or lacking behavior that is likely assumed label Aug 16, 2015
@natanrolnik
Copy link
Contributor Author

Ooops I just noticed while updating my pod.
I'm sorry!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

No branches or pull requests

2 participants