What did you do?
I have a double-ended train that has an interrupt for a refueling station when fuel is below a certain value.
Additionally the train also has an empty wait-condition for that refueling station.
This is important as the issue only seems to arise when the additional wait-condition of the refueling station is present.
What happened?
Once the train enters the refueling station due to the interrupt, the train gets stuck. The train status and inserters are flashing rapidly.
The attached savefile contains a very minimal example. In this example train is in the bugged state.
Deleting the non-interrupt wait-condition for the refuel station resolves the issue.
To reproduce the bug from a non-bugged state:
0. ensure that one of the locomotive has less than 10 coal inside of it
1. Add empty wait condition for the refuel station "coal load"
2. Have the train drive into the refuel station due to the interrupt
This seems to get the train stuck most of the time!
[2.0.15] train handling interrupt is stuck in station, flashing train status
[2.0.15] train handling interrupt is stuck in station, flashing train status
- Attachments
-
- factorio-current.log
- (7.56 KiB) Downloaded 12 times
-
- bug_report_train_stuck_2_0_15.zip
- train is in bugged state
- (1.86 MiB) Downloaded 14 times
Re: [2.0.15] train handling interrupt is stuck in station, flashing train status
This behavior has been reported a few times already. It is entirely caused by the interrupt that is defined with no schedule departure conditions. As soon as it arrives at the fuel station, it leaves again because there is no wait condition. Inserters don't react when trains have no wait conditions because it is never actually in the "wait at station" state, so no fuel can be added. Because it is still low on fuel when it tries to leave, the interrupt triggers again and a new, identical temporary stop is added to the schedule. It "arrives" at the new fuel stop immediately because it's already there, and the cycle repeats. That is why the train status flickers between states, but the schedule appears static--the interrupt stop is recreated the instant the old one finishes.
My question to you would be, why do you expect it to stay in the refueling station when there is no wait condition? Putting "Inactivity 5s" in the interrupt station condition completely fixes it for me. What can be improved in the documentation to make this more obvious?
My question to you would be, why do you expect it to stay in the refueling station when there is no wait condition? Putting "Inactivity 5s" in the interrupt station condition completely fixes it for me. What can be improved in the documentation to make this more obvious?
My mods: Multiple Unit Train Control, Smart Artillery Wagons
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Re: [2.0.15] train handling interrupt is stuck in station, flashing train status
+1 From me.
The temporary stop of the train caused by the interrupt event remains infinite in a cycle, even though the condition for resuming the route has already been met.
What did you do?
I noticed that the train logistics in my factory had collapsed because a bunch of trains were blocking one of the O-junctions there.
What happened?
As I approached this train mess, I found that one train was staying indefinitely at the stop used only by the interrupt event. While it was there, it flashed its lights like a stroboscope. I checked its status by opening its GUI and there was the temporary train stop with the fulfilled condition blinking in an infinite cycle. So the train never moved on to the next route point.
If you try to remove the condition manually, it will reappear. If you try to remove the temporary stop completely, the train will go on to the next point. What I've also noticed is that when the next trains in the queue arrive at the temporary point added by the interrupt event, a broken stop leading to nowhere is added to their route point list. There is no such stop in the interrupt event that is added.
Video:
https://youtu.be/yJYWy5LyUqM
Save of the game:
What did you expect to happen instead? It might be obvious to you, but do it anyway!
Once the train's temporary stop condition is met, it should be removed from the list of route points, so the train must proceed to the next point.
Does it happen always, once, or sometimes?
Sometimes.
The temporary stop of the train caused by the interrupt event remains infinite in a cycle, even though the condition for resuming the route has already been met.
What did you do?
I noticed that the train logistics in my factory had collapsed because a bunch of trains were blocking one of the O-junctions there.
What happened?
As I approached this train mess, I found that one train was staying indefinitely at the stop used only by the interrupt event. While it was there, it flashed its lights like a stroboscope. I checked its status by opening its GUI and there was the temporary train stop with the fulfilled condition blinking in an infinite cycle. So the train never moved on to the next route point.
If you try to remove the condition manually, it will reappear. If you try to remove the temporary stop completely, the train will go on to the next point. What I've also noticed is that when the next trains in the queue arrive at the temporary point added by the interrupt event, a broken stop leading to nowhere is added to their route point list. There is no such stop in the interrupt event that is added.
Video:
https://youtu.be/yJYWy5LyUqM
Save of the game:
What did you expect to happen instead? It might be obvious to you, but do it anyway!
Once the train's temporary stop condition is met, it should be removed from the list of route points, so the train must proceed to the next point.
Does it happen always, once, or sometimes?
Sometimes.
Re: [2.0.15] train handling interrupt is stuck in station, flashing train status
Thank you very much for this explanation. I did not realize that I had to add a wait condition. This makes actually sense when I think about.
Not sure whether documentation can be improved. I probably should have read more that documentation.
Not sure whether documentation can be improved. I probably should have read more that documentation.
robot256 wrote: ↑Sun Nov 10, 2024 9:07 pm This behavior has been reported a few times already. It is entirely caused by the interrupt that is defined with no schedule departure conditions. As soon as it arrives at the fuel station, it leaves again because there is no wait condition. Inserters don't react when trains have no wait conditions because it is never actually in the "wait at station" state, so no fuel can be added. Because it is still low on fuel when it tries to leave, the interrupt triggers again and a new, identical temporary stop is added to the schedule. It "arrives" at the new fuel stop immediately because it's already there, and the cycle repeats. That is why the train status flickers between states, but the schedule appears static--the interrupt stop is recreated the instant the old one finishes.
My question to you would be, why do you expect it to stay in the refueling station when there is no wait condition? Putting "Inactivity 5s" in the interrupt station condition completely fixes it for me. What can be improved in the documentation to make this more obvious?
Re: [2.0.15] train handling interrupt is stuck in station, flashing train status
Any updates to what I posted? Should I move it to a separate topic? In my case, I've clearly added the condition when a train should continue the route.
Re: [2.0.15] train handling interrupt is stuck in station, flashing train status
The train in your save file is doing exactly what you told it to. It constantly re-triggering the fuel interrupt and re-adding the fuel stop to the schedule. It is doing this because of the intended (and in my opinion useless) behavior of the "fuel wildcard". It matches *any particular fuel item* and can substitute *that particular fuel item* into the interrupt schedule. In your case, the "fuel wildcard < 10" is triggering because the locomotive contains 6 wood. The interrupt departure condition is "coal >= 500", and it is satisfied because the locomotive also contains 500 coal. Thus the interrupt continually triggers, departs, re-triggers, and re-arrives.
In your case, the best solution is to replace the "fuel wildcard < 10" condition with "coal < 10", so that it only triggers on the same fuel that it checks in the departure condition. You will have to update this when you change fuel types again. Another solution is to have inserters at the fuel stop that unload fuel items that are not what that station provides.
My mods: Multiple Unit Train Control, Smart Artillery Wagons
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk