The International Simutrans Forum

Simutrans Extended => Simutrans-Extended bug reports => Simutrans-Extended development => Simutrans-Extended closed bug reports => Topic started by: Mariculous on December 18, 2019, 12:08:17 AM

Title: [Bug] one_train_staff switching to drive_by_sight
Post by: Mariculous on December 18, 2019, 12:08:17 AM
Yet another one train staff bug thread.
When a one train staff cabinet is placed at or just behind a platform, trains will switch to one_train_staff working method for a short time but then fall back do drive_by sight

This just happened at the stephenson-siemens server, thanks to Elemental for detecting this.

I have attached a minimal reproduction case for this.
Title: Re: [Bug] one_train_staff switching to drive_by_sight
Post by: jamespetts on January 18, 2020, 04:21:18 PM
I am afraid that I am not able to reproduce this with the saved game attached: the locomotive is correctly in the drive by sight working method in the dead end section and the one train staff section in the loop. Is this not the behaviour that you are getting?
Title: Re: [Bug] one_train_staff switching to drive_by_sight
Post by: Mariculous on January 18, 2020, 04:55:37 PM
That is indeed what happens, however, I would expect it to be vice versa.
Maybe I misunderstood the usage of one_train_staff or maybe you missed a slight detail, so here is a more detailled description of what actually happen and what i would expect:

- When loading the game, the train is within the loop in drive_by_sight.
- It will continue to the platform where it will stop.
- When departing, it will switch to one_train_staff, I would not yet expect it.
- When entering the tile with the cabinet, it will switch back to drive_by_sight.
- After driving to the end of the dead-end and reversing, it will correctly switch to drive_by_sight when entering the loop.
- When stopping at the platform just before the cabinet, it will still be in one_train_staff mode.
- When departing, it (correctly) still is in one_train_staff, but will re-enter one_train_staff working method, thus creating a reservation up to the end of the dead_end track.

So, what I called a bug here is the fact that the train switches to one_train_staff working method when departing at the station, instead of when entering the cabinet tile.
If that is intended behavior, I just misunderstood the working method. However, that behavior is quite confusing, not only to me, but also to at least Vladki and Elemental who also did not know what was going on there on Stephenson-Siemens.

Edit: Note that when moving the station immediately to to the same tiles as the cabinets, the train will be in one_train_staff working method at the dead-end, as expected but will also unexpectedly be in one_train_staff mode at the loop.
To be more general, I guess there is something wrong with station exit signal logic in general.
Title: Re: [Bug] one_train_staff switching to drive_by_sight
Post by: jamespetts on January 18, 2020, 05:41:20 PM
Thank you for the clarification: this is helpful. I was confused as it was ambiguous in which direction that the one train staff cabinets were intended to be used.

However, I think that I have now found and fixed the problem, which was related to trains triggering one train staff cabinets too early (from stations).

I should be grateful if you could re-test with the next nightly build.
Title: Re: [Bug] one_train_staff switching to drive_by_sight
Post by: Mariculous on January 18, 2020, 05:46:01 PM
Quote from: jamespetts on January 18, 2020, 05:41:20 PMI should be grateful if you could re-test with the next nightly build.
I will test it now, as I expect many of the other bugs being related to this and I was just about to post these. Most are related to strange behavior around platforms.

Thanks for fixing this one :)
Title: Re: [Bug] one_train_staff switching to drive_by_sight
Post by: Mariculous on January 18, 2020, 07:52:30 PM
Confirmed to be fixed, whilst the beside mentioned remained.
See one_train_staff triggering twice on stations (https://forum.simutrans.com/index.php/topic,19486.0.html)
Title: Re: [Bug] one_train_staff switching to drive_by_sight
Post by: jamespetts on January 18, 2020, 08:16:57 PM
Splendid, thank you for the confirmation.