View Issue Details

IDProjectCategoryView StatusLast Update
0004362Spring engineGeneralpublic2016-02-19 15:17
ReporterJools Assigned TojK  
PrioritynormalSeveritymajorReproducibilitysometimes
Status closedResolutionno change required 
Product Version96.0 
Summary0004362: Server shuts down too soon
DescriptionSometimes the server shuts down too soon after game over, sometimes just 8 frames after game over was called. This is not enough time to show all explosions etc, and xta also does some stuff before it shows the end graphs.

The problems is mostly related to how to set a GameRulesParam after the server has shut down, it seems impossible, because those params can only be set from synced and therefore callins such as GameFrame are not called after server has shut down. It is possible to detect a server shut down in the Update() callin in unsynced, but I found no way of passing this information to synced, as gadget:RecvLuaMsg also stops listening after game over.

Would it be possible to have the server shut down always like no sooner than 2 seconds after gameover, or if this is not possible, would it be possible to notify with a synced callin when server is shutting down, so that people can finish off some stuff.

The problem is that some games, such as xta, hides the endgraph window to show something else befoe it, and then if the server shuts down too soon, it's not possible to show them again. This may be stupid practise, but if the engine accomodates both smart and stupid people, then it has efefctively doubled its audience :)
Additional InformationIn this case server shut down happens 10 frames after gameover. It seems to vary quite a bit depending on how the game is hosted.

[f=0000900] Vote succeeded, winner is:, 0
[f=0000901] GGW - Received:, nil, 0
[f=0000901] <LockCamera> 85 chars sent, 1 chars received.
[f=0000910] Server shutdown
TagsNo tags attached.
Checked infolog.txt for Errors

Activities

Jools

2014-04-15 15:51

reporter   ~0013015

Note that this does not happen if spring.exe is launched directly by running spring.exe, it only happens if it's launched via some lobby.

abma

2014-04-15 20:18

administrator   ~0013016

Last edited: 2014-04-15 20:19

is this on an autohost, relay host or manual hosting?

afaik "server shutdown" only happens when the host closes spring.

as the gameover is a gadget, you could delay gameover as well and send your stuff before ending the game in real.

Jools

2014-04-15 21:01

reporter   ~0013017

This happens on autohost and relayhost.

Yes, that's the solution I have adopted. It was just easier to divide stuff between game and gameover from programming point of view. Delaying gameover means cheking for more stuff in gadget:GameFrame which is not so good, but on the other hand maybe checking just for a GameRulesParam == 1 is not that expensive. I just wanted to minimise stuff in gameframe. Maybe also GameRulesParam is on the same level as checking Spring.IsGameOver?

Anyway, if server shutdown is out of control from engine then this report is not useful and you could close it.

jK

2014-04-15 23:49

developer   ~0013018

not spring's fault
Spring doesn't exit at all after gameend (it waits till all quited), the autohost kills the host.
So blame the used autohost.

Jools

2016-02-19 15:00

reporter   ~0015826

Fixed in spads by: https://github.com/Yaribz/SPADS/issues/11#issuecomment-185926860

You can now close this, just wanted to add the relationship.

Issue History

Date Modified Username Field Change
2014-04-15 15:49 Jools New Issue
2014-04-15 15:51 Jools Note Added: 0013015
2014-04-15 20:18 abma Note Added: 0013016
2014-04-15 20:19 abma Note Edited: 0013016
2014-04-15 20:37 abma Status new => feedback
2014-04-15 21:01 Jools Note Added: 0013017
2014-04-15 21:01 Jools Status feedback => new
2014-04-15 23:49 jK Note Added: 0013018
2014-04-15 23:49 jK Status new => closed
2014-04-15 23:49 jK Assigned To => jK
2014-04-15 23:49 jK Resolution open => suspended
2016-02-19 15:00 Jools Note Added: 0015826
2016-02-19 15:00 Jools Status closed => feedback
2016-02-19 15:00 Jools Resolution suspended => reopened
2016-02-19 15:17 abma Status feedback => closed
2016-02-19 15:17 abma Resolution reopened => no change required