It seems like each time a train waiting at a red signal changes destination station, due to the station getting disabled, it creeps forward a pixel or so. If that happens enough times the train can creep past the red signal.
I've attached a pretty extreme example where the trains swap station every tick as a demonstration, just turn off the constant combinator to get it running.
Apologies if this is a duplicate, I think I've seen something like this, but I can't find that post.
[kovarex] [for 0.16] [0.15.32] Trains creep forward when swapping destination
[kovarex] [for 0.16] [0.15.32] Trains creep forward when swapping destination
- Attachments
-
- Signal creep bug.zip
- (2.05 MiB) Downloaded 36 times
Re: [0.15.32] Trains creep forward when swapping destination
Those bugs describe slightly different situations, namely when there is no valid station/the same station appears twice in the schedule. What I'm doing here is swapping which of two identically named stations is enabled which apparently forces the same behaviour. It seems like the previous fixes removed the some other ways that the trains could get into this rapid switching mode but perhaps not the creeping itself if it gets there?
Running creative mode and enabling event logging (attached a short log from some manual triggering) for on_train_changed_state shows that each time the train switches station it cycles through "defines.train_state.arrive_signal" and "defines.train_state.wait_signal", each arrive_signal it manages to pick up some speed before stopping.
Running creative mode and enabling event logging (attached a short log from some manual triggering) for on_train_changed_state shows that each time the train switches station it cycles through "defines.train_state.arrive_signal" and "defines.train_state.wait_signal", each arrive_signal it manages to pick up some speed before stopping.
- Attachments
-
- event-log.txt
- (2.24 KiB) Downloaded 40 times
Re: [kovarex] [for 0.16] [0.15.32] Trains creep forward when swapping destination
I can confirm, that it is happening in 0.15, but not in the 0.16 where I cleaned up the train code.
This makes me even more confident, that the changes were for the better.
This makes me even more confident, that the changes were for the better.