AFNetworking/AFNetworking — Issue #212: [AFURLConnectionOperation cancel] crashes ...
Author: zdzisiekpu
Created: 2012-02-20 06:39:35+00:00
State: open

... when trying to execute [self.connection cancel]. It seems that the problem is with connection property being marked as "assign" instead of "retain". If the connection terminates before we get there, the "connection" object would be a dangling pointer. The solution would be revert back to "retain" and do self.connection = nil in:
- connectionDidFinishLoading:
- connection:didFailWithError:
end after each [self.connection cancel]