Furkan Mustafa
Furkan Mustafa

Reputation: 794

Pointer changing after function call

Here is some simple points about my problem;

So, on the line I marked "point of crash", It says;

-[__NSCFString timeIntervalSinceReferenceDate]: unrecognized selector sent to instance 0x7fdc2870

There are couple strange things in this situration I cannot solve;

I cannot understand how did the pointers changed in the middle of the way. Does anybody understand the situation?

Screenshot 1; http://cl.ly/image/1n1l1E1i2a3y

Screenshot 2; http://cl.ly/image/2A0s3S2J0S1P

Assembly Code around the code I'm calling RFC3339DateString function; http://pastie.org/private/e7xzc3ntfz0p0d95g5hzw

Upvotes: 4

Views: 94

Answers (1)

Droppy
Droppy

Reputation: 9721

I would suspect _updatedAt is being overwritten. Sometimes it contains an NSDate and sometimes an NSString. Add a watchpoint to see where it's being written to.

Also, you should never return nil from RFC3339DateString() as that will cause an exception within [NSMutableDictionary addObject:forKey:].

Lastly you don't need so many quotes in that date formatting string, just around 'T' and 'Z'.

Upvotes: 1

Related Questions