[0.15.36] [Dominik] Reproducible Train Collision

This subforum contains all the issues which we already resolved.
Kli_Womagni
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Oct 13, 2017 4:02 am
Contact:

[0.15.36] [Dominik] Reproducible Train Collision

Post by Kli_Womagni »

Trains were colliding in my large base, despite what I think is proper signal placement. The fast train fails to reserve an intersection even though it can't stop in time. I don't think trains should forget to mark signal blocks as reserved, especially not at high speed.

Here's a video that shows the whole collision process. Sorry about the low framerate, potato computer.
https://webmshare.com/play/MJPxd

The blue train reserves the intersection, entering at high speed. When it is completely inside the upper loop it stops reserving the intersection, even though it can't stop in time. It still reserves the blue exit block, just the intersection is unreserved. Meanwhile, the green train sees the intersection become free and enters, travelling towards the green exit block. The blue train reenters the intersection at high speed and causes a collision.

Here's a screenshot of the moment the blue train erroneously releases its reservation on the intersection. I've marked all the signals so you can more easily see the colours. The blue train is travelling at high speed while the green train is stationary. Also notice that the debug braking distance at the moment the blue train exits the intersection is already back inside the intersection. If that distance is inside the loop instead, the bug doesn't occur.
Screenshot of the moment blue train unreserves intersection
Screenshot of the moment blue train unreserves intersection
Crazy Trains - Markup.png (4.34 MiB) Viewed 1583 times
I've attached a small save that demonstrates the problem, just short-circuit the combinator to start the trains.

I've tried some variations and they illustrate the inconsistency of this problem.
  • If the blue train is slower (connect the shorter track on the right), it properly sets the intersection signals to yellow.

    If the blue train is instructed to use the alternative train stop (delete Blue Exit in the blue train), it slows down enough and properly sets yellow signals.

    If the green train is instructed to use the alternative train stop (delete Green Exit in the green train), it sees the blue train reserve that exit block (but not the intervening intersection) and correctly doesn't pass the chain signal into the intersection because its desired exit is busy.

    If the two signals in the loop are removed (rail and chain signals), the loop becomes part of the intersection block and of course the intersection doesn't get unreserved. I don't consider this to be a solution, it just hides the problem.
It's possible this is a duplicate of viewtopic.php?f=11&t=49581, but much cleaner reproduction, and it's definitely still happening in [0.15.36]. As far as I can tell there is no repathing, just that the fast train unreserves the intersection when it first leaves, not realising it needs to reuse the intersection and is going too fast to stop.

Save, log, and video are also available at https://www.dropbox.com/sh/gtu7z6yjuifz ... kFqTa?dl=0

I apologise for the biters which attack the factory, they don't come near the railway so it shouldn't interfere with the demonstration.
Attachments
factorio-current.log
Log
(5.52 KiB) Downloaded 101 times
Crazy Trains.zip
Save
(5.06 MiB) Downloaded 96 times
Crazy Trains.webm
Video of whole collision process
(6.39 MiB) Downloaded 101 times
Dominik
Former Staff
Former Staff
Posts: 658
Joined: Sat Oct 12, 2013 9:08 am
Contact:

Re: [0.15.36] [Dominik] Reproducible Train Collision

Post by Dominik »

I think that what is happening is that the train makes the reservation request for the future entry, as you say, but it is already on the block at that moment, so it does not add anything. And when it leaves the block as it enters the top loop, it unregisters from it completely, removing the future reservation too. Let me check it and get back to you.
Dominik
Former Staff
Former Staff
Posts: 658
Joined: Sat Oct 12, 2013 9:08 am
Contact:

Re: [0.15.36] [Dominik] Reproducible Train Collision

Post by Dominik »

I have tried your save. It indeed does occur in 15.36, but it is fixed in our current branch for 0.16. So thanks for the report and look forward to the new version :)
Post Reply

Return to “Resolved Problems and Bugs”