Posts

Post not yet marked as solved
4 Replies
We have exactly the same crash with iOS 13 only, including the crash stack. Noticed there are also things like this:Fatal Exception: std::logic_error: Unable to find resource `lang'[kLanguage]
Post not yet marked as solved
32 Replies
Thanks for your reply. This is the bug report number FB6119562
Post not yet marked as solved
32 Replies
I can reproduce this crash in this case. This crash only happened on iOS 12.x.- (void)cancelRequestWithAPI:(NSString *)api { if(api.length > 0 && ([api hasPrefix:@"http"] || [api hasPrefix:@"https"])) { AFHTTPSessionManager *manager = [self sessionManager]; NSArray *taskArray = [[NSArray alloc] initWithArray:manager.tasks copyItems:YES]; for(NSURLSessionDataTask * task in taskArray) { NSString *taskString = task.currentRequest.URL.absoluteString; if([taskString isEqualToString:api] || [taskString sq_containsString:api]) { if (task.state != NSURLSessionTaskStateCanceling && task.state != NSURLSessionTaskStateCompleted) { [task cancel];//This line causes the crash } } } } } - (void)sendHttpRequesWithAPI:(NSString *)api { [self cancelRequestWithAPI:api]; [NSURLSessionDataTask GET:api]; } - (void)reproduce { NSInteger i = 50; while(i > 0) { [self sendHttpRequesWithAPI:@"https://xxxxxxxx"]; i--; } }