0

I'm testing some code that performs some network operations. I'm using Kiwi and OHHTTPStubs libraries.

Currently i have one clase that holds all the responsibilities for performing requests, i'm using the Singleton pattern. This object holds a reference to an AFHTTPRequestOperationManager where i build my requests.

Here is the stack trace when the EXC_BAD_ACCESS occurs.

enter image description here

UPDATE:

This is the place where it crashes in AFHTTPRequestOperationManager.m

- (AFHTTPRequestOperation *)GET:(NSString *)URLString
                     parameters:(NSDictionary *)parameters
                        success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
                        failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure
{
    NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:@"GET" URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters];
    AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithRequest:request success:success failure:failure];
    [self.operationQueue addOperation:operation];

    return operation;
}

Line:

[self.operationQueue addOperation:operation];
bilby91
  • 904
  • 1
  • 8
  • 20

0 Answers0