NSInvocation returns value but makes app crash with EXC_BAD_ACCESS
I have an array which I am iterating and looking for a particular flag. If the flag value is nil, I am calling a method which generates an invocation object and returns the result of invocation. My code structure is as follows for(NSString *key in [taxiPlanes allKeys]) { Plane *currentPlane = [taxiPlanes objectForKey:key]; if(currentPlane.currentAction == nil) { NSString *selector = [[currentPlane planeTakeoffSequence] firstObject]; currentPlane.currentAction = selector; // Calling for NSInvocation in [self ...] NSArray *action = [NSArray arrayWithArray:[self operationFromTakeoffAction