3

I'm working on a project which uses ASIFormDataRequest to access the network and here is my code:

NSMutableString *url = [[NSMutableString alloc] initWithCapacity:10];
[url appendString:LOGINURL];
NSURL* nurl = [NSURL URLWithString:url];

ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:nurl];
request.timeOutSeconds = 30;
__weak ASIFormDataRequest *weakRequest = request;
[request setCompletionBlock:^ {
    NSString* str = [weakRequest responseString];
    block(str);
}];
[request setFailedBlock:failBlock];
[request startAsynchronous];

It works fine when the network is good. But if the network is terrible, then the requests always fail and the app would CRASH with this message:

libc++abi.dylib: terminate_handler unexpectedly threw an exception

I don't know why and even don't know how to debug it since there is no other crash message. How to debug it?

Don_Chen
  • 987
  • 2
  • 8
  • 16
  • Please provide a full symbolicated crash report. – Kerni Apr 15 '15 at 09:14
  • I'm afraid there isn't any more message, perhaps it's because I'm running it on release mode. The crash report is from my users whose network is very bad. – Don_Chen Apr 15 '15 at 12:26

0 Answers0