News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

[BUG] crash on loadsave

Started by Sirius, April 22, 2020, 12:04:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Sirius

What happened?
The game crashed after disconnecting from a server and loading a local savegame a savegame.

How to reproduce?
1. Connect to any server
2. Enforce a desync, e.g. by saving the map
3. Load any local savegame e.g. the "online" map you might just have saved
4. The map will progress for a very short time, maybe it's one step and crash afterwards.

I am quite sure this also happened to me the other way round i.e. loading a local save first and connecting to a server later on but I couldn't reproduce it.

ceeac

#1
This patch should fix the crash.

EDIT: I just realized the bug report is about Extended - The crash is also present in Standard but caused by a different bug (It is not present in Extended because the corresponding code is commented out).

jamespetts

Thank you for the report: I believe that I have fixed this. I should be grateful if you could re-test with to-morrow's nightly build.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Sirius

Seems to be fixed but now it crashes after saving such a game.

1. connect to a server
2. enforce desync
3. save game
4. game will run for a very short time after the save has finished and then crash.
The save itself is not corrupted. After restarting simutrans, you can load the savegame.

Quote from: ceeac on April 22, 2020, 01:39:49 PM(It is not present in Extended because the corresponding code is commented out).
Funny. Different code, same crash.

Phystam

Currently, our network game is no longer available due to this bug. In some cases, the force-sync command doesn't work correctly, and it causes no response.

Sirius

Sounds like a different bug to me, doesn't it?
Here reported crashes are related to loading or saving games offline after desyncing from a server.
Without loading (now saving) anything after cisconnecting from the server, the game will keep on running.

Quote from: Phystam on April 24, 2020, 09:19:37 AMCurrently, our network game is no longer available
You had a network game? Is it listed? I am aware that pak256.japan is far from complete but I am nevertheless interessted in trying it out online.

jamespetts

I am having trouble reproducing this. I was able to reproduce this the first time that I attempted this, but was not able to diagnose the problem fully without more extensive testing. However, on further testing, I could no longer reproduce this, and, despite many, many attempts, I have not been able to reproduce this since.

The problem appears to be related to the same transferring cargoes code as caused the original crash, and so may be related to the fix, but without being able to reproduce this reliably, this will be impractical to diagnose and therefore fix.

Is anyone able to assist with a more reliable reproduction case than the instructions so far given, since these do not appear to work in many cases?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

jamespetts

I have now been able to reproduce this one more time and believe that I have diagnosed the problem. I have pushed a possible fix for this, but cannot confirm because I am not able to reproduce this reliably enough.
I should be grateful if people could confirm whether this is fixed with to-morrow's nightly build.

Phystam - if your problem is not fixed with to-morrow's nightly build, there may be a separate issue, as the problem that I identified should not affect servers. I should be grateful if you could post a full bug report if the problem be not remedied with to-morrow's nightly build.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.