Client crashes with a faulty DNS resolution

Recently my ISP, Comcast, suffered a DNS server "outage" which prevented me from playing TribesNext online. I understand.. it happens, so I opted for a LAN-only day of it when I discovered that TN crashes when it doesn't have internet access or without DNS even in LAN-only mode.

Without much else to do I decided to chase down the bug. I ended up in file t2csri_list.cs at line 339. It seems that a TN client will crash whenever that local variable %server is used while empty.

I'm going to hazard a suggestion by replacing all of line 339 in file t2csri_list.cs with this instead;
if (%server !$= "") { %this.connect(%server); }

Best wishes.
-- jimmy

Comments

  • ThythThyth Apotheosis Incarnate
    The %server variable passed into that function is actually the constant "master.tribesnext.com:80", so checking if it is blank won't help. The connect() routine takes either IP addresses or hostnames with a colon delimiter for the port. The DNS resolution actually occurs once connect is executed. The game is known to crash on DNS resolution failure; it's one of the gifts Dynamix left us.

    Unfortunately, there is only one real way to test if DNS is functional, and that is to try to resolve an address.
  • Forgive me if I overstep myself. I'm inclined to go along with you on this. I don't really understand the significance of it but I felt it was important enough to note that the above suggestion does seem to help on my end here.

    However it works out in the end, perhaps the script can be safely avoided all together if the global variable $arg does not equal "-online" since everything in that script hinges on an active internet connection anyway?

    Something like this at the top of the file to prevent its execution when the client is using -nologin;
    if ($arg !$= "-online") { return }
    
  • ThythThyth Apotheosis Incarnate
    Yes, it would be prudent to not run any online network code when not running in online mode. I'll address it in RC3.
  • edited January 2011
    This game engine is weird. I give up trying to understand it. If you call TNbite::get(); on the console after t2csri_list.cs has executed.. just as that and without any arguments before you use the LAN browser, then the game won't crash. Go figure.

    I think that was why I had the impression that my original suggestion had worked when in fact it had no affect at all. WTF! How irritating.

    Using Writers support.vl2 to load a little script that does nothing but call TNbite::get(); after t2csri_list.cs is loaded.. everything original runs just fine. Now that crap isn't working either. That makes about as much sense to me as drinking a whole pot of coffee just before bed.
Sign In or Register to comment.