[0.16.25] Train uses incorrect wait conditions at station
Posted: Mon Feb 26, 2018 6:52 pm
While I was out adding new mines, one of my trains has seemingly stopped working. As I was out adding new mines I am unsure what could have caused this issue, I may have added some tracks very far away, and I may have added a new train stop irrelevant to the train, but none of that should affect it.
The train in question has a simple schedule with two stops, although the wait conditions are fairly long. Calling the stops X and Y, the train is currently stationary at X, while all wait conditions for X are fulfilled but no wait conditions for Y are fulfilled, and the schedule is giving me a square infront of stop Y. The train never actually leaves for Y though, and there is no green line from the train to stop Y when I turn on debug. The train in question is set to Automatic, and both of the stops it uses are available. It may be worth noting that there are multiple stops with the same name for both of these stops X and Y.
There is a chain signal after the train stop where the train is currently stationary, but removing this signal does nothing. I can 'fix' the train manually in a number of ways, such as turning it to Manual and then back to Automatic, or clicking 'Go to the station' for either of the stops in its schedule. The interesting part though, is that some changes to the wait conditions for stop Y can actually fix the train, too.
After some testing I found that the train, while waiting at stop X, is actually using the wait conditions from stop Y. If I edit the wait conditions for stop X, even remove all of them, nothing changes. If I edit the wait conditions for stop Y in such a way that still none of them are fulfilled, nothing changes. But if I edit the wait conditions for stop Y in such a way that they do become fulfilled, the train starts moving properly to stop Y.
So the problem seems to be that the train is waiting for wait conditions of stop Y, while stationary at stop X.
Unfortunately, I have no idea how or when this happened, so I can't offer any reproduction steps. If I use any of the above actions to fix the train, the train appears to be working fine again, even when it returns back to this station for example.
Below is a screenshot of the train. You can see the train is currently at stop X, that it's on Automatic, and it shows the square next to stop Y. You can also see most of stop Y's wait conditions. If I change these to make them fulfilled, such as removing the very first one (letting the '1s inactivity' be fulfilled), then the train will properly work.
Pastebin of factorio-current.log: https://pastebin.com/LfqcnAdk
Pastebin of factorio-previous.log: https://pastebin.com/N6VKr3NS
I have been running vanilla. Since first encountering the bug, I have loaded a simple mod that doesn't affect anything train related, and used it only on a different save file. Since first encountering the game I've also closed and reopened the game, as well as updated to 0.16.26. At the time of writing the train is still bugged, so none of these things seem to affect the problem when it's already been triggered.
Edit: Almost forgot to mention that I found one bug thread that seems similar, but something slightly different seems to be happening here. I'm unsure whether or not this is related: viewtopic.php?f=29&t=49217
Edit 2: Attached the save file. You should spawn right next to the broken train.
The train in question has a simple schedule with two stops, although the wait conditions are fairly long. Calling the stops X and Y, the train is currently stationary at X, while all wait conditions for X are fulfilled but no wait conditions for Y are fulfilled, and the schedule is giving me a square infront of stop Y. The train never actually leaves for Y though, and there is no green line from the train to stop Y when I turn on debug. The train in question is set to Automatic, and both of the stops it uses are available. It may be worth noting that there are multiple stops with the same name for both of these stops X and Y.
There is a chain signal after the train stop where the train is currently stationary, but removing this signal does nothing. I can 'fix' the train manually in a number of ways, such as turning it to Manual and then back to Automatic, or clicking 'Go to the station' for either of the stops in its schedule. The interesting part though, is that some changes to the wait conditions for stop Y can actually fix the train, too.
After some testing I found that the train, while waiting at stop X, is actually using the wait conditions from stop Y. If I edit the wait conditions for stop X, even remove all of them, nothing changes. If I edit the wait conditions for stop Y in such a way that still none of them are fulfilled, nothing changes. But if I edit the wait conditions for stop Y in such a way that they do become fulfilled, the train starts moving properly to stop Y.
So the problem seems to be that the train is waiting for wait conditions of stop Y, while stationary at stop X.
Unfortunately, I have no idea how or when this happened, so I can't offer any reproduction steps. If I use any of the above actions to fix the train, the train appears to be working fine again, even when it returns back to this station for example.
Below is a screenshot of the train. You can see the train is currently at stop X, that it's on Automatic, and it shows the square next to stop Y. You can also see most of stop Y's wait conditions. If I change these to make them fulfilled, such as removing the very first one (letting the '1s inactivity' be fulfilled), then the train will properly work.
Pastebin of factorio-current.log: https://pastebin.com/LfqcnAdk
Pastebin of factorio-previous.log: https://pastebin.com/N6VKr3NS
I have been running vanilla. Since first encountering the bug, I have loaded a simple mod that doesn't affect anything train related, and used it only on a different save file. Since first encountering the game I've also closed and reopened the game, as well as updated to 0.16.26. At the time of writing the train is still bugged, so none of these things seem to affect the problem when it's already been triggered.
Edit: Almost forgot to mention that I found one bug thread that seems similar, but something slightly different seems to be happening here. I'm unsure whether or not this is related: viewtopic.php?f=29&t=49217
Edit 2: Attached the save file. You should spawn right next to the broken train.