The International Simutrans Forum

 

Author Topic: [BUG] crash on loadsave  (Read 462 times)

0 Members and 1 Guest are viewing this topic.

Offline Freahk

  • Devotee
  • *
  • Posts: 1257
  • Languages: DE, EN
[BUG] crash on loadsave
« on: April 22, 2020, 12:04:26 PM »
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.

Offline ceeac

  • Devotee
  • *
  • Posts: 179
Re: [BUG] crash on loadsave
« Reply #1 on: April 22, 2020, 01:39:49 PM »
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).
« Last Edit: April 23, 2020, 06:49:49 AM by ceeac »

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 20207
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: [BUG] crash on loadsave
« Reply #2 on: April 22, 2020, 06:20:46 PM »
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.

Offline Freahk

  • Devotee
  • *
  • Posts: 1257
  • Languages: DE, EN
Re: [BUG] crash on loadsave
« Reply #3 on: April 23, 2020, 02:52:58 PM »
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.

(It is not present in Extended because the corresponding code is commented out).
Funny. Different code, same crash.

Offline Phystam

  • Devotee
  • *
  • Posts: 490
  • Pak256.Ex developer
    • Pak256 wiki page
  • Languages: JP, EN, EO
Re: [BUG] crash on loadsave
« Reply #4 on: April 24, 2020, 09:19:37 AM »
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.

Offline Freahk

  • Devotee
  • *
  • Posts: 1257
  • Languages: DE, EN
Re: [BUG] crash on loadsave
« Reply #5 on: April 24, 2020, 10:32:28 AM »
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.

Currently, 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.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 20207
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: [BUG] crash on loadsave
« Reply #6 on: April 24, 2020, 12:51:00 PM »
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?

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 20207
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: [BUG] crash on loadsave
« Reply #7 on: April 24, 2020, 01:54:25 PM »
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.