For lobbies - upload infologs somewhere after crash

For lobbies - upload infologs somewhere after crash

Requests for features in the spring code.

Moderator: Moderators

Post Reply
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

For lobbies - upload infologs somewhere after crash

Post 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.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: For lobbies - upload infologs somewhere after crash

Post 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. .
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: For lobbies - upload infologs somewhere after crash

Post by imbaczek »

unitsync doesn't launch spring iirc, it's the responsibility of the lobby.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: For lobbies - upload infologs somewhere after crash

Post by hoijui »

sorry, i explained it bad. let me try again.

we integrate the whole uploading and informing stuff into unitsync:

Code: Select all

void TryUploadingInfolog();
the lobbies would then do this:

Code: Select all

run spring.exe
if (spring crashed && userAcceptedUploadingInfolog)
   unitsync.TryUploadingInfolog();
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: For lobbies - upload infologs somewhere after crash

Post 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.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: For lobbies - upload infologs somewhere after crash

Post 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?
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: For lobbies - upload infologs somewhere after crash

Post by hoijui »

ahh yeah ok, that is a good argument.
i think spring returns something != 0 when it crashes.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: For lobbies - upload infologs somewhere after crash

Post by imbaczek »

crash return code is determined by the OS I guess; in C you'd check for return code != EXIT_SUCCESS.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: For lobbies - upload infologs somewhere after crash

Post by AF »

hmm not really helpful for java
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: For lobbies - upload infologs somewhere after crash

Post by imbaczek »

yeah, I know. don't know how java spawns processes though. != 0 should work.
Post Reply

Return to “Feature Requests”