ECToo / oax

Automatically exported from code.google.com/p/oax
0 stars 0 forks source link

No spawnpoint leave server in unusable state #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello,

If I post here you'll guess this is because I got bored.

We already had a discussion about how to deal with that problem, and you told 
me the "server start script" should handle it.
However, what happens is the QVM is unloaded and the game doesn't exit.
So the only way to handle it within the shell script would be to parse every 
line of the log being printed (probably not from the log file since it's not a 
bad idea to leave it buffered).

This problem won't likely occur again if all maps are crash-tested.

It seems like a pointless fix, but if the program could anticipate there will 
be no spawnpoints, then maybe it could do something.

Kinda related to this, I also proposed the idea to issue a command which would 
switch back the server in a safe state. My intent with this was both to have a 
mechanism to avoid such crashes, AND as a "complementary feature", have an 
option to switch back the server to that state if it detects there are no human 
players on it.
Scenario: people play, they call votes, then last player leaves -> the server 
is reset.

It would be up to the administrator to define the set of commands s/he 
estimates would bring back the server safe. This command could be issued 
whenever a "crash exception" would be raised.

Like usual, complaining but not providing patch.

---

In case you need, in that case, the game exits, but in others it doesn't (I 
don't exactly know why, the log is slighty different but I didn't think about 
copying it): 

********************
ERROR: Couldn't find a spawn point
********************
----- Server Shutdown (Server crashed: Couldn't find a spawn point) -----
Sending heartbeat to dpmaster.deathmask.net
Sending heartbeat to dpmaster.deathmask.net
==== ShutdownGame ====
ShutdownGame:

Original issue reported on code.google.com by un.cacat...@gmail.com on 4 Feb 2012 at 1:31

GoogleCodeExporter commented 9 years ago
If the server does not quit when the QVM gets unloaded it is a bug and needs to 
be fixed. 

One could let the engine scan the map before switching to it secure that there 
is a ffa-spawnpoint with no flags but there could be another reason why the QVM 
get unloaded. The QVM crash could be caused by some unfortunate circumstance 
that we have not yet discovered, so even if all maps are tested crash free the 
game could still crash. 

I might also look at he restore script option at some point for an empty 
server. 

Original comment by sago007 on 4 Feb 2012 at 10:09

GoogleCodeExporter commented 9 years ago
Okay, there is just this little difference in the log when the QVM is unloaded:

********************
ERROR: Couldn't find a spawn point
********************
----- Server Shutdown (Server crashed: Couldn't find a spawn point) -----
Sending heartbeat to dpmaster.deathmask.net
Sending heartbeat to dpmaster.deathmask.net
==== ShutdownGame ====
ShutdownGame:
------------------------------------------------------------
forcefully unloading qagame vm
---------------------------
]

Original comment by un.cacat...@gmail.com on 18 Feb 2012 at 7:07

GoogleCodeExporter commented 9 years ago
Seems to happen every time (for now I am able to trigger it at will on a 
server), VM gets unloaded, but the program is still running. I can issue some 
"/map" command from within the server window to reload the VM. That same 
command with RCON doesn't do anything, which means each time such a crash 
happens:
- no script can start it back, except by parsing the log I suppose
- no rcon admin can reset the server to a working state

Original comment by un.cacat...@gmail.com on 27 Jul 2012 at 10:34

GoogleCodeExporter commented 9 years ago
I believe this is fixed in 
https://github.com/OpenArena/gamecode/commit/544b034ccf137da2f86d871bb855ac63044
42b69

It basically forces the player to spawn in the first entity loaded or the map 
origin if the map has not entities at all. 

Original comment by sago007 on 10 Jun 2014 at 4:26