Page 3 of 3

Posted: 05 Feb 2007, 17:35
by Kloot
Does it have to be a php script? ;)

(on a side note, .cheat .crash doesn't produce a stacktrace here)

Posted: 05 Feb 2007, 23:25
by Tobi
Nothing in infolog.txt?

It doesn't necessarily have to be written in php, but that seemed easy because then the 100M debug executable can just sit at a server (though you could make a perl cgi script or something like that too with the same effect).

More details:

I now convert stacktraces by the following command:

Code: Select all

egrep '\([0-9]+\) [A-Za-z:\/. ]+ \[0x[0-9A-F]{8,8}\]' infolog.txt | \
 awk -F '\[|\]' '{print $2}' | xargs addr2line -f -C -e spring.exe | \
 sed 's/^Z/\n_Z/g' | c++filt
Break it in pieces to see what it does, it needs the debug exe and an infolog.txt with a stacktrace in it.

The debug executable for 0.74b3 (the spring.exe referenced in the above command) is available at: http://www.osrts.info/~tvo/spring/rc/sp ... -debug.exe (this is a self extracting 7z archive, the actual debug spring.exe in it is over 100M (max debugging enabled)). It is exactly the released executable apart from one call:

Code: Select all

strip spring.exe

Posted: 06 Feb 2007, 00:02
by Kloot
Yeah, infolog is empty (ends at the ".crash" command). I haven't looked at it myself, but is the stackwalking code disabled on Linux?

edit: never mind, judging from the absence of a crash-handler in System/Platform/Linux I think I know the answer to that one ;)

Posted: 06 Feb 2007, 04:08
by Kloot
Basic (not to mention slow) command-line stacktrace translator script is up here.

Posted: 06 Feb 2007, 08:42
by Tobi
You can make it a lot faster by buffering the hexadecimal addresses and only calling addr2line once, that's what I did in C++ for the sync debugger. (because, as you may have noticed, it's the loading time of addr2line that makes it slow, it needs to load 100M debug symbols after all...)

Indeed, I didn't write a linux stacktrace thing. For source distrib it doesn't make sense after all, could just use it for the debs etc., but then there needs to be a foolproof way of identifying the binary (ie. putting md5sum of the binary in the infolog or something).

Posted: 06 Feb 2007, 13:41
by Kloot
New version uploaded, it's roughly as fast as your command now. ;)

Posted: 06 Feb 2007, 20:14
by Tobi
Nice, thanks. I assume you don't mind if I convert it into an online stacktrace converter thing? :P

Posted: 06 Feb 2007, 21:41
by Kloot
No. :P

Posted: 07 Feb 2007, 23:15
by ZellSF
So, can anyone please compile a fixed Windows executable? Because I really want to host games and have LuaUI enabled..

Posted: 07 Feb 2007, 23:56
by jcnossen
Then you wont have sync...

Posted: 08 Feb 2007, 00:05
by ZellSF
Really? I didn't desync with the Linux version patched, I think :shock:

Posted: 09 Jul 2007, 00:02
by trepan