-
-
Notifications
You must be signed in to change notification settings - Fork 878
Sometimes, setting PFObject subclass properties causes unrecognised selector crash #96
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
Comments
Thanks for the report. It does not appear that parse is in this stack trace at all. Are you using KVO with PFObject instances? That is currently unsupported and may be causing the issues you are seeing. KVO automatically 'swizzles' out the class of the object you begin observing on, which would wreak havoc on our PFObject subclassing code as it stands. In the future, we would like to add KVO support, but it is not currently on our roadmap. If you're not using KVO, can you post the header for your PFObject subclass? There may be something |
Thank you for the fast reply Richard, I’m using KVO, but not on keys defined on the Parse model, only on local ivars. @interface BuggUser : PFUser
@property (nonatomic, copy) NSString * firstName;
@property (nonatomic, copy) NSString * lastName;
@property (nonatomic, copy) NSString * facebookId;
@property (nonatomic, strong) BuggUserPicture * picture;
@property (nonatomic, strong) NSDictionary * preferences;
@property (nonatomic, strong) NSDate * lastFetchAt;
@property (nonatomic, strong) NSDate * notificationsReadAt;
@end
@implementation BuggUser
@dynamic facebookId, firstName, lastFetchAt, lastName, notificationsReadAt, picture, preferences;
// other methods
@end |
Your subclass definition appears to be correct. I assume that you have properly registered your PFObject subclass, correct? Is it possible that you have another dangling pointer/stack corruption somewhere which is causing these issues? I'd recommend profiling your app with all of the available memory debugging options, including:
And see if anything pops up. The more I look at your stack trace, the less convinced I am that this is a Parse issue. For example, you seem to be directly invoking the internal method |
Yes, I have properly registered the subclass. |
The only thing I can think of is that PFObject subclass management was refactored for the 1.8 release. No functionality changes were made, but perhaps an edge case with KVO is no longer handled exactly the same way. |
Since 1.8.0, I'm experiencing random unrecognised selector crashes in our app.
I don't know why (haven't given a look at the SDK source code), when I write
object.property = something
, at runtime this gets translated to-[object _original_setProperty: something]
.I managed to solve one occurrence of this issue by using the notation
object [@"property"] = something
but it keeps showing up with other property names.I inspected the objects before the crash and found no clues or strange values.
I'm sharing with you two fabric stack traces, hope it helps figuring out what's wrong.
http://crashes.to/s/3daef3b256b
http://crashes.to/s/b12cbbb567d
The text was updated successfully, but these errors were encountered: