Page 1 of 1
[0.9.8] Pausing scheduled trains doesn't clear yellow signal
Posted: Wed Apr 16, 2014 10:03 pm
by Ezhar
Screenshot
How to reproduce: Build track as pictured, set train to drive to both stations (stop 0 seconds at both if that matters), then pause train at left station and manually drive down the dead-end track until past the signal there.
I'd expect that signal to show green. Bug? Feature?
Edit: See
below for more.
Re: [0.9.8] Why is this signal yellow?
Posted: Wed Apr 16, 2014 10:43 pm
by slay_mithos
As far as I know, yellow is for "this portion is the path of a train, not currently inside that portion".
Re: [0.9.8] Why is this signal yellow?
Posted: Wed Apr 16, 2014 11:04 pm
by Ezhar
Yes, yellow is a look-behind block reservation. There is no train heading towards that signal, so it shouldn't make reservations.
Re: [0.9.8] Why is this signal yellow?
Posted: Thu Apr 17, 2014 2:36 am
by ssilk
Hm. Normally the signals are very logic and I would mark them bug free.
Is there a signal above/under the train, in the other direction towards the switch? Because that would make more sense.
But so I guess: The yellow signal is seen as the first before the red signal. It is seen from the switch (which is the block before the red signal block. The algorithm searches for the signal of block reservation. Goes down in the circle, up and then comes again to the same block and then two steps before, because there must be a gap before a yellow signal. Or it goes from the switch up, left and then the stop splits the track (train stops separate segments:
https://forums.factorio.com/wiki/inde ... Train_stop ) and it is the signal before this segment-split.
Anyways, it's strange.

Re: [0.9.8] Why is this signal yellow?
Posted: Fri Apr 18, 2014 5:29 am
by Ezhar
I've figured it out. It seems the real bug here is that when a scheduled train has its schedule paused, any reservations it has made to signals ahead aren't freed (and manually driven trains don't make reservations). So the signal is yellow because a train had previously reserved it, but then been paused before arriving at the signal.
The signal is briefly cleared (green) after driving a train through manually, but resets to the false reservation (yellow) as soon as the train leaves its block. So I guess the fix is to clear any reservations a scheduled train has made when it is paused.
Here's a savegame demonstrating this if you want to reproduce/goof around:
trainsignals.zip
Re: [0.9.8] Pausing scheduled trains doesn't clear yellow si
Posted: Wed Jun 04, 2014 4:57 pm
by sillyfly
Just posting to verify I'm witnessing this bug as well - if a train "reserves" a block, but then is manually stopped before it reaches this signal, the signal is stuck in yellow (reserved) state until you manually cross it.
Re: [0.9.8] Pausing scheduled trains doesn't clear yellow si
Posted: Sun Jun 15, 2014 10:16 am
by slpwnd
Thanks for the report guys. And for the save with a fancy arrow:D This will be fixed in the 0.10.1.
Re: [0.9.8] Pausing scheduled trains doesn't clear yellow si
Posted: Sun Jun 15, 2014 4:40 pm
by sillyfly
Wonderful. I recently ran into this problem again, and it had all my trains running in loops because of one messed signal

Now I
really can't wait for you to release 0.10.1

Re: [0.9.8] Pausing scheduled trains doesn't clear yellow si
Posted: Mon Jun 16, 2014 3:53 pm
by slpwnd
sillyfly wrote:Wonderful. I recently ran into this problem again, and it had all my trains running in loops because of one messed signal

Now I
really can't wait for you to release 0.10.1

The only drawback is that initially when loading the save from 0.10.0 the yellow signals will not get magically migrated. But running through them with any (even manual) machine will solve the issue for once and all.