LuaUI (0.74b3) may cause crashes when hosting - Page 3

LuaUI (0.74b3) may cause crashes when hosting

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

Does it have to be a php script? ;)

(on a side note, .cheat .crash doesn't produce a stacktrace here)
Last edited by Kloot on 27 Oct 2007, 00:07, edited 2 times in total.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post 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
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post 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 ;)
Last edited by Kloot on 09 Jul 2007, 01:32, edited 2 times in total.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

Basic (not to mention slow) command-line stacktrace translator script is up here.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post 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).
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

New version uploaded, it's roughly as fast as your command now. ;)
Last edited by Kloot on 27 Oct 2007, 00:14, edited 1 time in total.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Nice, thanks. I assume you don't mind if I convert it into an online stacktrace converter thing? :P
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

No. :P
ZellSF
Posts: 1187
Joined: 08 Jul 2006, 19:07

Post by ZellSF »

So, can anyone please compile a fixed Windows executable? Because I really want to host games and have LuaUI enabled..
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

Then you wont have sync...
ZellSF
Posts: 1187
Joined: 08 Jul 2006, 19:07

Post by ZellSF »

Really? I didn't desync with the Linux version patched, I think :shock:
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

Post Reply

Return to “Lua Scripts”