HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...
Bug #854623
Improve handling of savegame load failure, particularly due to missing ruleset
Start date:
Due date:
% Done:
0%
Estimated time:
Description
I accidentally tried loading a 2.6 savegame using ruleset 'augmented2' when I didn't have the ruleset available.
This went surprisingly badly:- The server carried on trying to a few bits of the savegame, such as treaties, even after it was obviously doomed for lack of ruleset. e.g.
1: Failed to load ruleset 1: Treaty between unknown players Joyce Banda and Koimala ... 1: In secfile_lookup_str() [/home/jtn/src/freeciv/git26/utility/registry_ini.c:2043]: secfile '/tmp/freeciv-T0089-Y-0275-final.sav.bz2' in section 'NULL': "history.title" entry doesn't exist. 1: Failure loading savegame!
- The server was left in an unusable state.
1: in send_ruleset_game() [/home/jtn/src/freeciv/git26/server/ruleset.c::6863]: assertion 'game.veteran != ((void *)0)' failed.
- The client then segfaulted, trying to cope with a NULL
game.plr_bg_color
/
- Add a bit more logging, to make it easier to spot the reason for failure to load the ruleset.
- Most
sg_load_*()
do a the standardsg_check_ret()
at the start of the function, but a few did not. (Hence the random complaints about treaties for nonexistent players.) - Change what happens at the end of a failed load attempt: since
load_command()
doesserver_game_free()
/server_game_init()
, do that again, then load a ruleset. (On S2_6, whatever is currently configured;sg_load_ruleset()
will have left that sane.) I haven't thoroughly checked this is the right thing to do, but it's closer than what was there before, and seems to work.- (I'm not convinced the server implementation of
game_reset()
is useful for anything. This removes the only call.)
- (I'm not convinced the server implementation of
History
#1
Updated by Jacob Nevins over 2 years ago
- File m-savegame-load-failure.patch m-savegame-load-failure.patch added
- File 30-savegame-load-failure.patch 30-savegame-load-failure.patch added
- File 26-savegame-load-failure.patch 26-savegame-load-failure.patch added
- Status changed from In Progress to Resolved
#2
Updated by Jacob Nevins over 2 years ago
- Status changed from Resolved to Closed