Author Topic: What's the best way of debugging a crash like this. edit: NEW CRASH, PICS POSTED  (Read 5535 times)

Before my server crashed three lines got posted to the console:
Code: [Select]
Error: NetStringTable::incStringRef() - id "80031" out of range (size = 256)
Error: NetStringTable::lookupString() - id "80031" out of range (size = 256)
Only two saved to the log.
As I said in my other topic I'm like %75 sure these lines (possibly with different ids) posted before the first time my server crashed as well.


Now I understand what "out of range" means, but generally assumed that Torque was immune to such crashes.
I mean if I do "clientGroup.getObject(1000);" on a server, it'll be out of range, but won't crash.
I guess this means I have to figure out what NetStringTable is, but it sure as hell isn't anything in any script I wrote.

Any debugging ideas?

I could obviously try and do a trace and wait for the server to crash but lord knows I'd have to round up a few dozen testers and have them pretend to play for like half an hour then sift though a console log probably hundreds of megabytes big. Assuming the trace itself didn't crash the server, as it occasionally does.






A crash occurred while I was AFK after about 12 hours of run time.
« Last Edit: August 11, 2014, 10:55:22 PM by DrenDran »

If it's any help, the NetStringTable is where the engine stores tagged strings


If it's any help, the NetStringTable is where the engine stores tagged strings
Neither
Code: [Select]
for($a=0;$a<100000;$a++){commandtoclient(findclientbyname("blo"),$a,"hi");}
Nor
Code: [Select]
for($a=0;$a<100000; $a++){echo(getTaggedString($a));}
Will crash a server.
So trying to get a tagged string out of range doesn't crash anything.
I guess there's a possibility these two console lines were just a coincidence, but I really hope that's not the case or else I have no where to start looking for the cause of the crash.

80031 is a really large number. I wonder if that's an object ID?

80031 is a really large number. I wonder if that's an object ID?
Thought so, my first thought was I made a typo in a script like:
Code: [Select]
commandtoclient('',%client,'centerPrint',"Message here.");
But that doesn't cause a crash.

Thought so, my first thought was I made a typo in a script like:
Code: [Select]
commandtoclient('',%client,'centerPrint',"Message here.");
But that doesn't cause a crash.

I would guess that it is a typo of some sort. Search your scripts for commandToClient and double-check all of them.

This is not caused by torkscript. It's a bug in the engine.

Trace won't help either.


How should I use this?
you open blockland and ollydbg, then click file->attach and do blockland.exe. After it finishes attaching just do debug->run so blockland runs and then host, wait for the crash, and olly will pick it up, giving you the address of where the crash came from and various other details.

This is not caused by torkscript. It's a bug in the engine.

Trace won't help either.

Your magical powers just tell you this?


While lookupString doesn't cause any crashes (done via getTaggedString(int) out of range)
What causes incStringRef to get called?

While lookupString doesn't cause any crashes (done via getTaggedString(int) out of range)
What causes incStringRef to get called?
the StringHandle constructor

the StringHandle constructor

Right, so he's making something a tagged string that shouldn't be a tagged string.