Hello,
Since iOS 8.3 was released, I started getting lots of crashes in the iOS simulator. I'm using the latest iOS SDK 10.2.4.
Unfortunately, I couldn't figure out a pattern, as the app just crashes from time to time.
Do you have any suggestions on how to debug/address these issues?
Attached are the crash screenshots.
Regards,
Marius
We too have seen intermittent crashes on the simulator in the following ways :
The good news is that so far we haven't seen the crash on a device, but we believe this issue stems from a bug in iOS 8. We have reported the issue to Apple by filing a radar - #18590356 NSURLSession will crash the application.
Following is the code we submitted that reproduces the crash on iOS 8. We have escalated the issue to Apple through our business contact, but I suggest you also file an independent radar to add more weight to the issue.
while (YES) {
@autoreleasepool{
NSURL *url = [NSURL URLWithString:@"http://prod.lists.apple.com/archives/macnetworkprog/2014/Oct/msg00001.html"];
NSURLSessionConfiguration *config = [NSURLSessionConfiguration ephemeralSessionConfiguration];
NSURLSession *session = [NSURLSession sessionWithConfiguration:config delegate:self delegateQueue:nil];
NSURLSessionDataTask *task =
[session dataTaskWithURL:url
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *error) {
NSLog(@"response: %@", response);
}];
[task resume];
[task cancel];
// *** It is this call to finishTasksAndInvalidate that seems to trigger the crash.
// If I comment it out, no crash.
//[session finishTasksAndInvalidate];
[session invalidateAndCancel];
}
}
This will be fixed with the upcoming 10.2.5 release.