When I going to cancel download process, after 1-2 seconds after call of StopAllCoroutines() Xcode throw “exc_bad_access” error. As I can see at call hierarchy it occurred somewhere in WWW class logic.
This error appears only at iOs configuration. For Mac, Windows and Android all is OK.
I’m using Unity 5.3.4 version. This error is actual when both scripting Backend are used: IL2CPP and Mono2x.
Does anybody has faced with this problem and how can I resolve this?
code example:
public class SomeClass: MonoBehaviour
{
// Called after call of Download method of DownloadHelper class
private void CancelDownloadProcess()
{
//...
this.StopAllCoroutines(); "exc_bad_access" error
//...
}
}
public static class DownloadHelper
{
// Launched from SomeClass
public static IEnumerator Download(string url)
{
using (WWW www = new WWW(url))
{
while (!www.IsDone)
{
yield return www.progress;
}
//...
}
}
}