Hi there
I'm experiencing a crash outside my code when I try to store one of my 'LocationTime' objects... but only when the set called 'areas' has content.
My LocationTime object looks like this (it's a point in space / time, so resembles a typical location object):
@interface LocationTime : NSObject
@property (nonatomic, retain) NSNumber * latitude;
@property (nonatomic, retain) NSNumber * longitude;
@property (nonatomic, retain) NSDate * time;
@property (nonatomic, retain) NSSet *areas;
@property (nonatomic, retain) OfferEvent *offerEvent;
@property (nonatomic, retain) User *user;
-(CLLocation *) getLocation;
-(LocationTime *) initWithLocation:(CLLocation *)location andAreas:(NSSet *)areas;
@end
And the 'Area' objects which I populate the 'area' set with look like this (this is rather like a CLCircularRegion):
@interface Area : NSObject
@property (nonatomic, retain) NSNumber * centerLatitude;
@property (nonatomic, retain) NSNumber * centerLongitude;
@property (nonatomic, retain) NSString * displayDescription;
@property (nonatomic, retain) NSNumber * radius;
@property (nonatomic, retain) NSSet *locationTimes;
@property (nonatomic, retain) NSSet *offers;
@property (nonatomic, retain) NSString *identifier;
@end
When I attempt to persist a LocationTime object on FF, it works fine, unless I have 1 or more Area objects in the areas set. In this case it crashes and yields a dump like this:
2014-03-17 17:19:27.625 Refresh[49837:60b] -[__NSSetI addObject:]: unrecognized selector sent to instance 0x9f5cf20
<unknown>:0: error: -[FatFractalDataTests testLocationTimeCanBeCreatedAndRetrieved] : -[__NSSetI addObject:]: unrecognized selector sent to instance 0x9f5cf20
(
0 CoreFoundation 0x01de91e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x01b688e5 objc_exception_throw + 44
2 CoreFoundation 0x01e86243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x01dd950b ___forwarding___ + 1019
4 CoreFoundation 0x01dd90ee _CF_forwarding_prep_0 + 14
5 Refresh 0x00043291 -[FatFractal setValuesOnObject:fromDict:loadFromCacheOnly:doAutoLoadRefs:doAutoLoadBlobs:] + 2027
6 Refresh 0x000380dc __51-[FatFractal createObj:atUri:onComplete:onOffline:]_block_invoke + 620
7 Refresh 0x0003199e __102-[FatFractal invokeHttpMethod:body:bodyIsJson:mimeType:onUrl:responseIsJson:customHeaders:onComplete:]_block_invoke + 1525
8 Refresh 0x0004c9d4 -[FFHttpDelegate connectionDidFinishLoading:] + 86
9 Foundation 0x01931e49 ___NSURLConnectionDidFinishLoading_block_invoke + 40
10 Foundation 0x018c87e1 __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke + 62
11 Foundation 0x01750f5e -[NSURLConnectionInternalConnection invokeForDelegate:] + 119
12 Foundation 0x01750ec6 -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 208
13 Foundation 0x01750dd8 -[NSURLConnectionInternal _withActiveConnectionAndDelegate:] + 76
14 Foundation 0x01751188 _NSURLConnectionDidFinishLoading + 43
15 CFNetwork 0x0213d69f ___ZN27URLConnectionClient_Classic26_delegate_didFinishLoadingEU13block_pointerFvvE_block_invoke + 111
16 CFNetwork 0x0213b3de ___ZN27URLConnectionClient_Classic18_withDelegateAsyncEPKcU13block_pointerFvP16_CFURLConnectionPK33CFURLConnectionClientCurrent_VMaxE_block_invoke_2 + 104
...
It appears that the Area objects get created correctly, but the operation fails at some point after that. Any suggestions would be greatly appreciated.
EDIT: I just tried running this against my local environment, and I can see that the object is actually persisted correctly - the server reports 201, and I can access the object at the URL provided in the server log. So this appears to be an issue with the client.