- Home /
GetThreadContext failed during runtime (not in editor)
Now I've always had this issue: http://answers.unity3d.com/questions/17683/fatal-error-in-gc-getthreadcontext-failed
Where I get a GetThreadContext failed when loading unity, and it's due to me having eset and I can deal with this because it's only me. My problem is I've had people previously report they get the error with a build version of my game and I just got it myself for the first time.
The exact error is
Fatal error in gcc
GetThreadContext failed
Now I've been able to narrow it down, and it happens when WWW tries to return something.
The specific code that is causing it in my app is pretty much the wiki version of highscores.
public IEnumerator GetScores(string level) { _highScore = "Loading Scores";
var highscoreUrl = HighscoreUrl + "level=" + WWW.EscapeURL(level);
var hsGet = new WWW(highscoreUrl);
yield return hsGet;
if (hsGet.error != null)
{
Debug.Log("There was an error getting the high score: " + hsGet.error);
}
else
{
_highScore = hsGet.text;
}
}
Seems to cause the error every time. The error just pops up in the middle of the screen maybe 3-4s after the coroutine starts and causes the application to freeze.
Now I don't think it's acceptable to have to require every user of eset or Kaspersky to allow their game through their firewall to make it work.
Now my only real options I can think of if there is no easy fix is to rewrite my own version of WWW to download webpages.
Or does anyone know a way to at least make the error fail silently. I can live with displaying a warning that users will need to allow through firewall to see high scores.
-update-
Does not cause the error when Development Build is selected.