The International Simutrans Forum

 

Author Topic: Train disappears in server game  (Read 435 times)

0 Members and 1 Guest are viewing this topic.

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2547
    • My addons, mostly roadsigns
  • Languages: EN, CS
Train disappears in server game
« on: February 23, 2019, 01:24:34 PM »
It happened to me already twice, that a train just disappeared in server game. (on the stephensons-siemens server). I was reconstructing the rail tracks and for a short while there might have been no route, but not for long (maybe a minute or two in real time). I got disconnected, and when connected back, one of the trains on the affected line was gone. At least I got some refund for it...    I would expect the train to get stuck and wait for player to fix the tracks....

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18394
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Train disappears in server game
« Reply #1 on: February 23, 2019, 01:57:52 PM »
This, I think and if I recall correctly, is the emergency response when a train gets stuck and cannot get to any depot, even by teleporting. Were any suitable depots available anywhere for this to go to?

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2547
    • My addons, mostly roadsigns
  • Languages: EN, CS
Re: Train disappears in server game
« Reply #2 on: February 23, 2019, 02:25:05 PM »
Yes There was a suitable depot (at least for teleporting).

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18394
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Train disappears in server game
« Reply #3 on: February 23, 2019, 03:48:14 PM »
Can you upload a saved game in which this can reliably be reproduced at a specific place and time?

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2547
    • My addons, mostly roadsigns
  • Languages: EN, CS
Re: Train disappears in server game
« Reply #4 on: February 23, 2019, 03:49:46 PM »
I'll try if I can make it happen again. Usually the autosave is broken after that and the demo game is loaded.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18394
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Train disappears in server game
« Reply #5 on: February 23, 2019, 03:54:10 PM »
I'll try if I can make it happen again. Usually the autosave is broken after that and the demo game is loaded.

I am not sure that I follow what you mean by "after that and the demo game is loaded" - can you elaborate?

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2547
    • My addons, mostly roadsigns
  • Languages: EN, CS
Re: Train disappears in server game
« Reply #6 on: February 23, 2019, 04:29:36 PM »
I'm not sure how it all went, but I think I got disconnected, and when tried to load the automatic save-on-quit game simutrans crashed, and next time showed the demo game...
Whatever I do not recall exactly what happened, and it would be quite hard to replicate...

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18394
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Train disappears in server game
« Reply #7 on: February 23, 2019, 05:46:17 PM »
I see - if you do manage to produce a reproduction case for either this or the original issue, please do let me know.

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2547
    • My addons, mostly roadsigns
  • Languages: EN, CS
Re: Train disappears in server game
« Reply #8 on: April 09, 2019, 07:01:31 PM »
Ok, it happened again. I somewhat thought it could happen, but did not save the game before....
I have deleted a rail bridge on active line. Soon after that a train reported no route, and before I managed to finish the earthworks for new bridge I was disconnected from the game. When I returned, the train was sold. It did not take more than a minute between deleting the bridge and disconnecting.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18394
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Train disappears in server game
« Reply #9 on: April 09, 2019, 09:07:05 PM »
Is this reliably reproducible; i.e., does it always happen when deleting a railway bridge on an active line? I will not be able to investigate this without being able to reproduce it reliably.

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2547
    • My addons, mostly roadsigns
  • Languages: EN, CS
Re: Train disappears in server game
« Reply #10 on: April 17, 2019, 11:44:18 PM »
I tried to prepare a test case by removing one tile of track and that went without any problems - no route was shown for several minutes, and I had plenty of time to rebuild it and got no desync. However, later when I played and rebuilt tunnels for higher speed (longer curves), I got desynced and lost my train. I seems that it desynced just at the moment when the new track was finished.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18394
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Train disappears in server game
« Reply #11 on: April 18, 2019, 12:24:21 AM »
This appears to relate to a loss of synchronisation issue rather than a train disappearing.

I should note that I have recently fixed a bug that would cause trains to teleport in some cases where a token block signal and a choose signal were used in certain combinations; I wonder whether that might have fixed your issue.

Offline ACarlotti

  • *
  • Posts: 344
Re: Train disappears in server game
« Reply #12 on: April 18, 2019, 01:02:08 AM »
The loss of synchronisation could occur if you managed to make changes to the world without (or before) triggering any of the blocks of code that wait for the convoy routing to stop. If that were the cause of the desync, then it would only be triggered by actions taken on one particular step (per convoy) every 25s (the length of time between consecutive route searches for a convoy), so it would be hard to reliably reproduce. However, one approach might be to identify a save game and a precise sequence of clicks that sometimes leads to a desync (on the last click), and then one of us could try setting a breakpoint at the point where the tool action is carried out and stepping through the code from there to see what happens.