x


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.

more ▼

asked Mar 01 '11 at 01:12 AM

tertle gravatar image

tertle
1.1k 15 18 33

(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1944
x525
x3

asked: Mar 01 '11 at 01:12 AM

Seen: 1097 times

Last Updated: Mar 01 '11 at 01:55 AM