Author Topic: Train not driving to planned route  (Read 517 times)

0 Members and 1 Guest are viewing this topic.

Online Jando

Train not driving to planned route
« on: May 06, 2017, 08:10:11 AM »
Occasionally I see a convoy (in this case: train) not following the planned route. I'm unsure what causes this, but I suspect some subtle bug when saving/loading a game while a train is loading or unloading goods at a station (*). I have now captured a game where a train shows this bug when I load the following saved game: http://files.simutrans.com/index.php/s/NXdp0k7mIoZ9oYm

How to see the bug:

1. Load above saved game.
2. Hit pause.
3. Open vehicle list, jump to train #4. Train has just arrived at a power station and is offloading coal.
4. Check planned route for train #4. Train is now at stop #3 and should return to colliery (stop #1) after offloading the cargo. 
5. Hover mouse cursor above train and un-pause game. See loading timer count down.
6. After loading timer has reached zero train reverses and next destination changes to stop #2, the one before the current stop in the planned route.

* I suspect the saving/loading because I have seen a few more oddities with trains waiting/loading/unloading at a station. Sadly I have not yet been able to reproduce this reliably enough to create a saved game where this can be easily observed. Will try to do just that over the weekend.

Oddities are: train still waiting for 100% cargo before saving the game although station has enough cargo. Train will have loaded cargo and depart station after loading the saved game. Train will also depart station without loading timer if player opens train schedule or if another train (no matter whether same line) pulls into another platform of the same station.

Second oddity: train correctly waiting for 100% load at station (not enough cargo) before saving shows waiting for clearance after loading the game.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 16090
  • Total likes: 438
  • Helpful: 177
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Train not driving to planned route
« Reply #1 on: May 06, 2017, 09:46:23 PM »
Thank you for the report. When I load the game, you have "reverse schedule" checked, the correct function of which is to cause the train to go back to stop no. 2 rather than start at the beginning of its schedule. Sine "reverse schedule" is selected when the game is loaded, I am unable to determine whether this was checked by you in the game (perhaps by accident) or was set automatically in error.

As to the second oddity, I think that this is the same as a bug reported elsewhere, which I think that I have fixed.
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.

Online Jando

Re: Train not driving to planned route
« Reply #2 on: May 06, 2017, 10:48:21 PM »
Thank you for the report. When I load the game, you have "reverse schedule" checked, the correct function of which is to cause the train to go back to stop no. 2 rather than start at the beginning of its schedule. Sine "reverse schedule" is selected when the game is loaded, I am unable to determine whether this was checked by you in the game (perhaps by accident) or was set automatically in error.

As to the second oddity, I think that this is the same as a bug reported elsewhere, which I think that I have fixed.

Odd thing, James, mirror schedule shows not selected for me. Screenshot here: http://files.simutrans.com/index.php/s/92VGueai15UwDPs

Not sure really whether mirror and reverse schedule are the same though, did I miss something? If so my apologies.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 16090
  • Total likes: 438
  • Helpful: 177
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Train not driving to planned route
« Reply #3 on: May 06, 2017, 11:24:09 PM »
The two things are not the same: the mirror schedule setting is a setting that will automatically set and un-set the reverse schedule option. It is possible to set and un-set the reverse schedule setting manually, which might have happened here.
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.

Online Jando

Re: Train not driving to planned route
« Reply #4 on: May 06, 2017, 11:42:01 PM »
You can now officially declare me to be dumb. :)

I actually did not notice this reserve schedule check box before. Please don't ask me how I managed to miss that one, I must have looked at that screen for many hours by now! How do I get my foot out my mouth now? Awfully sorry, James, to report something as bug that was solely my own fault and to waste your time with that!

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 16090
  • Total likes: 438
  • Helpful: 177
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Train not driving to planned route
« Reply #5 on: May 06, 2017, 11:51:34 PM »
Don't worry - I do wonder whether that checkbox should be moved to the edit schedule window to make it less easy to select by accident, but the UI is not easy to work with and that would take time away from fixing bugs.
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.