If a train approaches a red signal controlling access to a block that that train is already in, the train will ignore the red signal and hence crash into itself. This is a bug; the most fundamental rail safety rule is a train should never cross a red signal.
Example:
Because of this bug, in a large base with long trains, they occasionally path into and then crash into themselves, despite accurate signaling, making for a very discouraging gameplay experience.
I am aware this is a very old issue: 62183. However, in that issue, DaveMcW stated that the behavior is intentional because "If a train was blocked by its own red signals, it would not be able to move at all." But that is not true; when a train enters an intersection normally, it crosses a yellow signal:
Despite searching, I have not found any other offered justification for trains behaving this way in Factorio.
The attached save file demonstrates the basic problem as shown in the screenshots above. The same file also has a demonstration of how this arises in a more realistic rail network. To see that, instruct the train near the "Before Trigger" station to advance to that station. That will set in motion a combination of circumstances that leads to a crash in the roundabout:
Please fix trains so they properly respect signals, including those caused by themselves.
[2.0.76] train crosses a red signal, crashes into itself
[2.0.76] train crosses a red signal, crashes into itself
- Attachments
-
- train_bug4.zip
- reproducer save file
- (4.74 MiB) Downloaded 5 times
-
- train-crash.log
- game log file
- (6.46 KiB) Downloaded 7 times
Re: [2.0.76] train crosses a red signal, crashes into itself
Regarding 77759, yes I think that is basically the same issue. Regarding that report, boskid says "Not a bug", but goes on to discuss primarily path cost issues, which I think is secondary to safety.
They also say:
Regarding https://factorio.com/blog/post/fff-299, it explains that the policy of allowing a train to cross red signals caused one particular problem, and describes how that problem was solved, but does not address why the unsafe policy exists to begin with, nor acknowledge that there are remaining problems with it even after that fix.
They also say:
Regarding "cases where train enters same block twice", IMO that simply should not be allowed. Again: do not cross red signals. A rail network design that requires one train to enter an already occupied block (including by itself) is clearly deficient and (most likely) easily remedied (e.g., by splitting said block with another signal). The correct Factorio behavior in such a case would be for the train to deadlock, not blow through the signal and risk crashing.there is exception for signaling that allows train to go by red signal if block is reserved for same train (to handle cases where train enters same block twice, https://factorio.com/blog/post/fff-299) so everything you described is "as designed"
Regarding https://factorio.com/blog/post/fff-299, it explains that the policy of allowing a train to cross red signals caused one particular problem, and describes how that problem was solved, but does not address why the unsafe policy exists to begin with, nor acknowledge that there are remaining problems with it even after that fix.

