One train with coal has reserved a path through the waiting bay. It is going almost at full speed.
[kovarex] [15.19] Trains collide reproducibly on specific layout
[kovarex] [15.19] Trains collide reproducibly on specific layout
Hi there. I have a peculiar train collision. I have not changed the signals recently and I'm not driving manually, so this probably should not happen.
One train with coal has reserved a path through the waiting bay. It is going almost at full speed.
One train with coal has reserved a path through the waiting bay. It is going almost at full speed.
Coal Train and its path
As it enters the bay, it still has his path reserved
At the moment when it is completely in the bay, it gives up its reservation of the block it exited and is about to enter again, the train is going at full speed and will not stop
The train loses the right to enter this block, the train next to it has reserved this block
The train enters the block anyway
The train collides with the other train
What happens from the perspective of the other train:
Before the train with coal is completely in the bay, the train with copper is not allowed to pass
Once the train with coal is in the bay, and has wrongfully given up his reservation, the train with copper can leave
The trains are now in the same block
Re: Train wrongfully gives up block reservation
Post a save where this can be observed please.
Re: Train wrongfully gives up block reservation
Wait a bit at the station and get in to the train that will soon arrive. Get in to the first train that arrives. This is the train with coal, so be prepared for a bumpy ride
If you want to, you can also run north and still be in time to get in to the train with copper.
If you want to, you can also run north and still be in time to get in to the train with copper.
- Attachments
-
- Error03.zip
- (7.63 MiB) Downloaded 216 times
Re: Train wrongfully gives up block reservation
If you want to reproduce the bug, you will need the following:
- 3 locomotives
- Some fuel
- The blueprint below (4 stations, 6 signals, 3 chain signals, some rails)
- Set up one single headed loc to go around the circular track and the other one, a two headed wagonless train to go back and forth on the other track.
- Each train should stop at the two stations on his track with the condition "leave after 5 seconds of inactivity".
- 3 locomotives
- Some fuel
- The blueprint below (4 stations, 6 signals, 3 chain signals, some rails)
- Set up one single headed loc to go around the circular track and the other one, a two headed wagonless train to go back and forth on the other track.
- Each train should stop at the two stations on his track with the condition "leave after 5 seconds of inactivity".
Blueprint
Enjoy the colliding trains Re: Train wrongfully gives up block reservation
I've done all your steps but the trains are working flawlessly and never hit each other.IV wrote:If you want to reproduce the bug, you will need the following:
- 3 locomotives
- Some fuel
- The blueprint below (4 stations, 6 signals, 3 chain signals, some rails)
- Set up one single headed loc to go around the circular track and the other one, a two headed wagonless train to go back and forth on the other track.
- Each train should stop at the two stations on his track with the condition "leave after 5 seconds of inactivity".
BlueprintEnjoy the colliding trains
Are you using any mods? How long do i have to wait?
If you want to get ahold of me I'm almost always on Discord.
Re: Train wrongfully gives up block reservation
Ok, so after reproducing it in 0.15.12 it happens almost immediately. It doesn't happen at all in 0.15.13 so I guess we already fixed it
If you want to get ahold of me I'm almost always on Discord.
Re: Train wrongfully gives up block reservation
The bug is solved for this blueprint but a slight adaptation shows that the bug is not fixed. The new blueprint:
Blueprint
Re: Train wrongfully gives up block reservation
Can confirm with 15.13 and new save.IV wrote:(...)a slight adaptation shows that the bug is not fixed.
Edit: Still the case for 15.19.
Re: [Hanziq] [15.19] Trains collide reproducibly on specific layout
i have checked both of these blueprints and it appears to be a problem with improper signaling, the little loop is missing signals, and the timing just perfect on the other signals to cause the trains to colide, adding a signal on the top loop prevents the trains from coliding again. i looked closely at the other topic that is also related, viewtopic.php?f=182&t=49581 and it is also a signaling issue, the weird looking intersection makes it hard to see but a few of the intersections are missing signals, and the petro train in the video should have taken the right lane but instead took the left lane, ive seen my trains do strange stuff like this too, but have no idea why.
Re: [Hanziq] [15.19] Trains collide reproducibly on specific layout
Greeting Philip,
the signaling is indeed absurd in the given example. It is not meant for any practical purpose, it is only meant to give a small reproducible example. However, improper signaling on its own can never lead to collisions between trains.
Let me elaborate why. Two trains can only collide if they are in the same block. This should never happen. If a train is already occupying a block (or has reserved it) a second train should not enter the block. Thus in each block there will always be only one train. There is a corner case, where two trains try to enter/reserve a block simultaneously. In such a case, if it is handled properly, only one of the trains will enter the block. (In factorio probably the one with the smaller id.)
the signaling is indeed absurd in the given example. It is not meant for any practical purpose, it is only meant to give a small reproducible example. However, improper signaling on its own can never lead to collisions between trains.
Let me elaborate why. Two trains can only collide if they are in the same block. This should never happen. If a train is already occupying a block (or has reserved it) a second train should not enter the block. Thus in each block there will always be only one train. There is a corner case, where two trains try to enter/reserve a block simultaneously. In such a case, if it is handled properly, only one of the trains will enter the block. (In factorio probably the one with the smaller id.)
Re: [Hanziq] [15.19] Trains collide reproducibly on specific layout
i remember that crashing trains with out proper signaling was actually called a feature of this game, therefore not a bug.
if the devs decide to change this functionality then true trains should never crash with crazy signaling.
but in my opinion it is part of the fun of the game, don't give your trains proper signaling, then prepare to have to deal with the wrecks that ensue.
trains are one of the things that was a large learning curves, for me, about this game.
it could be simplified a bit in not requiring signals to prevent crashes.
but then you could build an entire rail network with out needing signals at all.
for me, leave as is, let the trains crash, but if you change it to not needing signals at all, it will certainly simplify the rail network (better for newbies)
if the devs decide to change this functionality then true trains should never crash with crazy signaling.
but in my opinion it is part of the fun of the game, don't give your trains proper signaling, then prepare to have to deal with the wrecks that ensue.
trains are one of the things that was a large learning curves, for me, about this game.
it could be simplified a bit in not requiring signals to prevent crashes.
but then you could build an entire rail network with out needing signals at all.
for me, leave as is, let the trains crash, but if you change it to not needing signals at all, it will certainly simplify the rail network (better for newbies)
Re: [Hanziq] [15.19] Trains collide reproducibly on specific layout
This is surprising to me. Under which conditions can a train enter a block which is already occupied/reserved by an other train?Philip017 wrote:i remember that crashing trains with out proper signaling was actually called a feature of this game, therefore not a bug.
if the devs decide to change this functionality then true trains should never crash with crazy signaling.
I do recall that a train can crash into itself, if it is long enough and the block it on has a self-intersecting loop that is tight enough.
Re: [Hanziq] [15.19] Trains collide reproducibly on specific layout
Umm,
I don't know if it's related, but.. isn't (attached) that piece a little awkward when it comes to reserving track?
We have overlapping sections.
I don't know if it's related, but.. isn't (attached) that piece a little awkward when it comes to reserving track?
We have overlapping sections.
- Attachments
-
- track issue.png (190.46 KiB) Viewed 8983 times
Re: [Hanziq] [15.19] Trains collide reproducibly on specific layout
it looks like the devs are hard at work to help identify improper signaling,IV wrote: This is surprising to me. Under which conditions can a train enter a block which is already occupied/reserved by an other train?
I do recall that a train can crash into itself, if it is long enough and the block it on has a self-intersecting loop that is tight enough.
https://www.factorio.com/blog/post/fff-198
before reading that FFF i didn't even know the debugging information was there to help identifying signaling issues, once this is fully implemented i believe that creating automated rail networks will be much better.
Re: [kovarex] [15.19] Trains collide reproducibly on specific layout
I identified and cleaned up some mess and logical problems in the train logic. It should be fixed for 0.16, I'm actually wondering now, why didn't it happen more often.
Re: [kovarex] [15.19] Trains collide reproducibly on specific layout
This may also be caused by landfill placement, placing a large solar array blueprint or alignment before placing it.
3-4x now after expanding my solar setup the trains have become blocked at my iron smelter.
Signal passed at danger
https://puu.sh/xj9Df/2bff13f607.jpg
Signals
https://puu.sh/xj9Fs/73b9e8ff2d.jpg
3-4x now after expanding my solar setup the trains have become blocked at my iron smelter.
Signal passed at danger
https://puu.sh/xj9Df/2bff13f607.jpg
Signals
https://puu.sh/xj9Fs/73b9e8ff2d.jpg