Closed webdevotion closed 11 years ago
I finally found it. I started to inline some code, removed some dependencies on super classes etc. Still the same problem. But it enabled me to get closer to the real culprit. Namely Mr. Developer himself.
Turned out I did gave my Entity a custom class name, but made a typo. So the code was being executed on the default class of said Entity, namely NSManagedObject.
I'm experiencing a crash in my app whenever I hit https://github.com/soffes/ssdatakit/blob/master/SSDataKit/SSRemoteManagedObject.m#L104
When I set a breakpoint on line 104 (
if ([object shouldUnpackDictionary:dictionary]) {
) the application crashes ( log below ).object
is an instance of the class I would expect it to be. That class is a subclass of an APIClass, which inherits from SSRemoteManagedObject. I am surprised by the problem because when I log[self class]
during execution, I see the class I'm expecting. But the crash mentions[NSManagedObject shouldUnpackDictionary:]
. I understand my class is a sub-sub-sub-class ofNSManagedObject
, but it should try to send the message at least toSSRemoteManagedObject
.I would appreciate it if someone could give me a tip on how to debug this bug, which is probably in my implementation, not a bug in SSDatakit.
Output: