1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Greetings Guest!!

    In order to combat SPAM on the forums, all users are required to have a minimum of 2 posts before they can submit links in any post or thread.

    Dismiss Notice
  3. Greetings Guest, Having Login Issues? Check this thread!
    Dismiss Notice
  4. Hail Guest!,
    Please take a moment to read this post reminding you all of the importance of Account Security.
    Dismiss Notice
  5. Author Wes Locher has teamed up with Stratics for a giveaway of his new book Braving Britannia. This book explores the history and impact of Ultima Online and includes interviews from current and past dev team members as well as many UO and Stratics community members. Click here for more details!
    Dismiss Notice

If you get constant "GetThreadContext failed" crashes, this should fix it

Discussion in 'Project: Gorgon Discussion Hall' started by Perkus, Jun 6, 2013.

  1. Perkus

    Perkus Visitor

    Jun 6, 2013
    Likes Received:
    I was crashing out every 5-20 minutes for a whole week, using the stand-alone version, as well as with 3 different browsers, using both the regular & alternate browser launcher. Tried all sorts of things & theories, nothing worked, until I finally got a clue and tracked this down as a common problem caused by an bug in current versions of the game's Unity3D engine when used in conjunction with certain anti-virus products or similar. In my case, the culprit is Avast 8.0, but it's also said to happen with Kaspersky, ESet, and probably others. Even disabling your AV won't help, you would actually have to uninstall it! There is a good thread on this issue here at Unity forums here: http://forum.unity3d.com/threads/17...0-1482-quot-getThreadContextfailed-quot-error.

    There is a fix given there on page 3, by CreativeChris. It has instantly solved my issue with this and I haven't seen the crash since, even with AVast enabled. It has also helped most others. Even though this was identified in March, it is not yet part of the current release of Unity 3D, which is 4.1.x. It is supposed to be released whenever 4.2 comes out. Not that while the post suggest that this is only supposed to be a fix for the Unity dev kit "editor", I've tried applied it to just the Windows Player and it works fine. Until then, you need to apply it manually as follows:

    1) Download the modified mono.dll file from here: https://docs.google.com/file/d/0Bz4rtnpF8SvMNm0tLUpRdUxrVzA/edit

    2) Go to the Windows Player / Mono subdirectory Project Gorgon installation. On Win7 it should be here:

    3) Rename the mono.dll file there as something else like mono-orig.dll, in case you need to go back because this failed or makes it worse.

    4) Copy the mono.dll file you've downloaded into this directory.

    This seems to be a fairly common problem with Unity in many games for years now, so hopefully this saves someone a lot of headaches...

    EDIT: I've just discovered that whenever there is a version update, the launcher/patcher will replace the mono.dll file with the broken version from the server again. So you'll most likely need to repeat this every time there is an update. The "bad" version of the file is 2046K, the "good" one is 2048K. I've tried making it read-only, not sure if that will work.


    P.S. I've actually so far only tested it with the stand-alone launcher, as I prefer that, so I'm not sure if this also fixes the bug if using the browser version, since I don't know if it accesses this same file location.
    #1 Perkus, Jun 6, 2013
    Last edited: Jun 6, 2013
    Citan likes this.
  2. Citan

    Citan Project: Gorgon Developer

    Oct 23, 2012
    Likes Received:
    Great find, thanks! I admit I was kind of at a loss on this one, when the game hard-crashes it's usually out of my hands, and all in Unity's. (But not always -- if it's triggered by an in-game action like dragging-and-dropping or wearing a certain item, it's my code... if it's intermittent driver issues, I usually don't have any recourse but to hope it gets fixed by Unity.)

    If the next Unity update takes too long, I'll look into baking this into the auto-patcher so you don't have to re-copy it each update. I'm not sure if that would have effects on other platforms, so I'd prefer them to just update, but if it's more than a week or two I'll test it out.