Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Openttd Dedicated server crashes when failing to load a recent savegame #5793

Closed
DorpsGek opened this issue Oct 26, 2013 · 6 comments
Closed
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

twerkhoven opened the ticket and wrote:

Openttd Revision: 25912
OS: CentOS 6.4 64bit

OpenTTD is started with -D -f options (dedicated server, forked to background)

When loading a more recent game, which then fails to load (eg due to missing newgrf), the game crashes with below assertion error. The error does not occur when its an older savegame failing to load, the error is handled gracefully and the server generates a random map and keeps running.

crash.sav and log are included, dmp and png are not created. Non-dedicated clients do not exhibit this behaviour. The gui will refuse to load the game in the first place. When forcing the client to load the game via console, it will load the game and simply ignore missing grfs.

Savegames which cause this error if they fail to load:
http://www.openttdcoop.org/files/publicserver_archive/PublicServerGame_260_Final.sav
http://www.openttdcoop.org/files/publicserver_archive/PublicServerGame_268_Final.sav

Savegame where failing to load it is handled gracefully and keeps the server up with a random map:
http://www.openttdcoop.org/files/publicserver_archive/PublicServerGame_207_Final.sav

** below is the console before it generates crash.log:
[2013-10-26 20:04:16] dbg: [net] Loading game failed, so a new (random) game will be started!
Error: Assertion failed at line 351 of /home/openttd/svn-devserver/src/linkgraph/../core/smallvec_type.hpp: index < this->items
Crash encountered, generating crash log...

** This is what should happen, and happens with older games.
[2013-10-26 20:27:28] dbg: [net] Loading game failed, so a new (random) game will be started!
[2013-10-26 20:27:28] dbg: [net] Generating map, please wait...
[2013-10-26 20:27:28] dbg: [net] Map generation percentage complete: 5
[2013-10-26 20:27:28] dbg: [net] Map generation percentage complete: 10
...
[2013-10-26 20:27:28] dbg: [net] Map generation percentage complete: 90
[2013-10-26 20:27:28] dbg: [net] Map generation percentage complete: 99
[2013-10-26 20:27:28] dbg: [net] Map generated, starting game
[2013-10-26 20:27:28] ERROR: Game Load Failed?NewGRF mismatch

Attachments

Reported version: trunk
Operating system: Linux


This issue was imported from FlySpray: https://bugs.openttd.org/task/5793
@DorpsGek
Copy link
Member Author

fonsinchen wrote:

How do you load the save games? Are you using the -g option or some console command?


This comment was imported from FlySpray: https://bugs.openttd.org/task/5793#comment12708

@DorpsGek
Copy link
Member Author

fonsinchen wrote:

I can't quite reproduce it. Do you happen to have gdb around and could you try to get a stacktrace with exact line numbers? Also I get these message in between:

ERROR: Missing GRF file(s) have been disabled
ERROR: Train 'Train 1,385' belonging to 'Bloggs & Co.' has invalid length. It is probably caused by problems with NewGRFs. Game may desync or crash

Do you get that, too? It basically means "no warranty". I agree that the game shouldn't just load the bad savegame without asking and then crash. It might be a better idea to have a --force parameter for that kind of behaviour.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5793#comment12709

@DorpsGek
Copy link
Member Author

planetmaker wrote:

The savegame load command is given via script which interfaces the admin port.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5793#comment12710

@DorpsGek
Copy link
Member Author

twerkhoven wrote:

http://paste.openttdcoop.org/show/2760/

Above link has slightly more info, most importantly a gdb-backtrace with line numbers. To reproduce, I emptied the newgrf folder from content_download so that they are pretty much all missing. A newgrf folder with only the newest version of all bananas-available newgrfs should produce the same result, that was the situation when I first reported it.

To clarify, I am not interested in getting the game loaded with missing newgrfs. I merely want openttd to tell me which ones are missing/wrong version so that I may fix it rather than crashing. As it is, some are reported before crashing. But even after fixing the ones it tells me about, it still crashes.

I am happy to try more savegames to see with which savegame version this issue begins.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5793#comment12711

@DorpsGek
Copy link
Member Author

frosch wrote:

The cleaning order of Pools in undefined. ~LinkGraphJob may not rely on items from other pools to exist.

Suggested fix: http://paste.openttdcoop.org/show/2761/


This comment was imported from FlySpray: https://bugs.openttd.org/task/5793#comment12712

@DorpsGek
Copy link
Member Author

frosch closed the ticket.

Reason for closing: Fixed

in r25934


This comment was imported from FlySpray: https://bugs.openttd.org/task/5793

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant