[15.9] Train pathing error when editing tracks
Posted: Mon May 08, 2017 3:49 am
Encountered on 0.15.9
Summary: train deadlocks against itself when asked to re-path while traveling to its destination.
My base has a single rail line that cuts through it from North to South, with a number of side "exits" for offloading. Offloading trains always have to enter from the South and exit the base to the North. Just North of the base is a small loop "turnaround" for trains that want to exit the base to the South to go pick up their next load. I have chain signals in place to make sure that trains doing this don't deadlock with other trains exiting the base.
Since the trains turn around, the trains generally have to claim a certain segment of the track going both directions. That is, in locking the signals, there's a certain segment that will be traversed twice, in both directions--the piece after the train has exited its type-specific offloading/stop area, and right before the turnaround segment.
This normally works perfectly. It runs smoothly for hours at a time. However, pretty much every time I'm editing my train lines--merging paths, adding signals, etc., I get a train that deadlocks. It gets stuck at the exit to the base, right before entering the turnaround segment. Giving the train new pathing orders doesn't help; I have to manually enter the train to fix it. However, I can just inch the train forward slightly towards the turnaround, then give it an order to resume its schedule, and it works just fine. At that point, it works fine, rediscovers the path it was supposed to take originally, and proceeds as normal.
This seems to be a single-train deadlock. None of the other trains are ever in unexpected positions when I discover this. I can reproduce it reliably by hand with several of my trains. I inch the train past the signal that sits just beyond its unloading stop, then give it an order to path to a station that requires it to use the turnaround and exit to the South. In the attached save, the Copper train does this the most reliably, and the Coal/Stone train can do this when ordered to the Coal mine. The train proceeds to the signal that guards the turnaround, then stops there forever. I can also reproduce by boarding the Copper train while it's at its stop in the base, ordering it to the Copper Mine, then ordering it to the Copper Mine again a second or two later, after it has proceeded past the first signal but not the second.
It seems like it would be a bug that the train can plot a reliable path that involves covering a particular segment in both directions, but that when you re-issue the order once the train is in motion along the planned path, it no longer identifies this as a feasible path and deadlocks.
The attached save has the player standing directly next to the Copper train that has deadlocked. You can either back the train up into its depot or forward over the signal and re-issue the order to the Copper Mine and it reliably succeeds. But re-issuing the order from its current location reliably fails.
Summary: train deadlocks against itself when asked to re-path while traveling to its destination.
My base has a single rail line that cuts through it from North to South, with a number of side "exits" for offloading. Offloading trains always have to enter from the South and exit the base to the North. Just North of the base is a small loop "turnaround" for trains that want to exit the base to the South to go pick up their next load. I have chain signals in place to make sure that trains doing this don't deadlock with other trains exiting the base.
Since the trains turn around, the trains generally have to claim a certain segment of the track going both directions. That is, in locking the signals, there's a certain segment that will be traversed twice, in both directions--the piece after the train has exited its type-specific offloading/stop area, and right before the turnaround segment.
This normally works perfectly. It runs smoothly for hours at a time. However, pretty much every time I'm editing my train lines--merging paths, adding signals, etc., I get a train that deadlocks. It gets stuck at the exit to the base, right before entering the turnaround segment. Giving the train new pathing orders doesn't help; I have to manually enter the train to fix it. However, I can just inch the train forward slightly towards the turnaround, then give it an order to resume its schedule, and it works just fine. At that point, it works fine, rediscovers the path it was supposed to take originally, and proceeds as normal.
This seems to be a single-train deadlock. None of the other trains are ever in unexpected positions when I discover this. I can reproduce it reliably by hand with several of my trains. I inch the train past the signal that sits just beyond its unloading stop, then give it an order to path to a station that requires it to use the turnaround and exit to the South. In the attached save, the Copper train does this the most reliably, and the Coal/Stone train can do this when ordered to the Coal mine. The train proceeds to the signal that guards the turnaround, then stops there forever. I can also reproduce by boarding the Copper train while it's at its stop in the base, ordering it to the Copper Mine, then ordering it to the Copper Mine again a second or two later, after it has proceeded past the first signal but not the second.
It seems like it would be a bug that the train can plot a reliable path that involves covering a particular segment in both directions, but that when you re-issue the order once the train is in motion along the planned path, it no longer identifies this as a feasible path and deadlocks.
The attached save has the player standing directly next to the Copper train that has deadlocked. You can either back the train up into its depot or forward over the signal and re-issue the order to the Copper Mine and it reliably succeeds. But re-issuing the order from its current location reliably fails.