Page 1 of 1
For lobbies - upload infologs somewhere after crash
Posted: 09 Oct 2008, 10:15
by imbaczek
see topic. I'd like the lobbies to check spring's exit code and/or infolog.txt after exit to see if it contains a stacktrace and
1) rename infolog.txt to something different
2) upload it somewhere
3) notify something that a crash has been uploaded (i dunno, post to twitter or whatever, just so the devs know that something has been uploaded.)
rationale: people are complaining that the game crashes, but don't tell anyone about the details.
Re: For lobbies - upload infologs somewhere after crash
Posted: 09 Oct 2008, 10:44
by hoijui
what if we integrate it into unitsync?
in the the lobbies:
Code: Select all
run spring.exe
if (spring crashed && userAcceptedUploadingInfolog)
unitsync.TryUploadingInfolog();
i guess lobbies would have to ask the user explicitly, if he ever wants to upload anything, before they would do it. could be once, when starting the lobby for the first time eg. .
Re: For lobbies - upload infologs somewhere after crash
Posted: 09 Oct 2008, 11:01
by imbaczek
unitsync doesn't launch spring iirc, it's the responsibility of the lobby.
Re: For lobbies - upload infologs somewhere after crash
Posted: 09 Oct 2008, 11:07
by hoijui
sorry, i explained it bad. let me try again.
we integrate the whole uploading and informing stuff into unitsync:
the lobbies would then do this:
Code: Select all
run spring.exe
if (spring crashed && userAcceptedUploadingInfolog)
unitsync.TryUploadingInfolog();
Re: For lobbies - upload infologs somewhere after crash
Posted: 09 Oct 2008, 11:09
by imbaczek
i don't think unitsync is the proper place for this... it should do one job and do it well. maybe a different library, but really I think that lobbies should do this in their own ways.
Re: For lobbies - upload infologs somewhere after crash
Posted: 09 Oct 2008, 11:53
by AF
That would require networking libraries in unitsync, whereas the lobbies already have libraries and APIs for those sorts of actions.
I take it spring returns -1 when it crashes?
Re: For lobbies - upload infologs somewhere after crash
Posted: 09 Oct 2008, 12:12
by hoijui
ahh yeah ok, that is a good argument.
i think spring returns something != 0 when it crashes.
Re: For lobbies - upload infologs somewhere after crash
Posted: 09 Oct 2008, 18:00
by imbaczek
crash return code is determined by the OS I guess; in C you'd check for return code != EXIT_SUCCESS.
Re: For lobbies - upload infologs somewhere after crash
Posted: 09 Oct 2008, 18:06
by AF
hmm not really helpful for java
Re: For lobbies - upload infologs somewhere after crash
Posted: 09 Oct 2008, 19:18
by imbaczek
yeah, I know. don't know how java spawns processes though. != 0 should work.