Вопрос

I'm using NSURLSession together with NSURLSessionDataTasks to manage background data fetching in my app. I am intermittently seeing EXC_BAD_ACCESS crashes on a background thread with the following stack trace:

Looking deeper reveals that the dispatch_group_notify_f is trying to retain nil.

What could be happening in my code to cause this?

Это было полезно?

Решение

I was not able to solve this problem except by not calling invalidateAndCancel and instead just waiting for the tasks to complete in the event of an error. I'm sure that further investigation could have found a way to prevent this, but working around it was easier.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top