Here’s a little crossing design to prove that things are quite broken. Each end of the crossing is entirely connected through a single circuit network. The northern and southern ends have a slightly different design.
I’ll explain the southern end first. The player gates output a green circuit signal when they detect the player. The rail signal in front of the crossing has green ≠ 0 as its close condition, so it will try to stop trains when there’s a player. That rail signal outputs a red circuit signal when its aspect is either red or yellow. That red circuit signal opens the train gates and closes the player gates. There’s another rail signal well before the crossing that outputs yellow when its aspect is red or yellow. That only affects the lamps, not the crossing mechanism. Lamp interpretation:
White = crossing is idle
Yellow = crossing is idle, but a train is coming
Red = train has reserved the crossing
Green = player has reserved the crossing
This design worked properly and was safe in 0.16. It doesn’t require the rail signal to force a train to stop when it’s really too late, because the train always owns the crossing. The way a player can cross is that they request the train to stop, and the train
will stop if it hasn’t yet reserved the crossing. There is no race condition because the player is detected before they can actually run into/through a gate. You can space the auxiliary gates out to deal with higher exoskeleton/car speeds, and grow the window where a car is detected while stopped.
0.17 is now troublesome. If you walk up to the gates while the signal before the crossing is yellow (i.e. the lamps show red but the train isn’t on the crossing yet), but before the braking point has passed the waypoint station past the crossing, the train will relinquish its reservation and brake harder than it should be capable of to stop for you once its braking point hits the waypoint station. Weird, but it doesn’t break things. If instead the braking point doesn’t pass a waypoint station (in this setup, because the braking point has already passed the waypoint, or because you stopped the train and you leave and then re-enter the crossing immediately), the train will not stop for the close request, but the signal will switch to circuit-closed as soon as the train enters the crossing. That then opens the player gates, allowing them to run into the train. If the train was moving slowly, it will bump into the closing train gate at the other end.
The northern end has a slightly different design. It has a chain signal not connected to the circuit network in front of the crossing. The rail signal after the crossing is now the one that tries to close when a player is detected. A new signal placed in the other direction is used to detect trains. This should be a better design overall because trains shouldn’t stop on the crossing in case of congestion. It also works around 0.17’s circuit-closed blinding behavior by reading the block’s state through a different signal.
There’s still an issue, though. You can actually make the train stop in the middle of the crossing despite the chain signal. You can trigger it in this setup by bringing the train to a stop at the southern end. Then walk out to the south to allow the train to move again. When the train has actually entered the crossing (avoiding the yellow issue described earlier), run into the closed player gate. Note that the lamps at the northern end turn green as you do so. Stop attempting to walk through the gate so they turn white again. (What matters is that the gates don’t detect you, but they will as soon as you start moving toward them. This is just an easy way to achieve that.) Now wait for the northern lamps to turn red and the crossing to close, then walk north. As the train owns the crossing at that point, the gates won’t open for you. Then the train brakes insanely hard to stop for the circuit-controlled signal, in the middle of the crossing. The reason is that at this speed, its braking point passes the waypoint station while it’s on the crossing. That makes it relinquish the reservation even though it has entered the block through a chain signal of all things.
P.S. The crossing itself has a minor issue. If you block a train, but move out of the way before it’s stopped entirely, the train can hit the entrance gate before it’s had time to open. I don’t think that’s a bug in Factorio. You can fix it by moving the entrance signal farther away from the entrance gate.
Edit: Aside from this crossing, it’s also not just manually placed trains. Trains can enter blocks through different signals. If one signal is successfully circuit-closed, that doesn’t stop trains entering through other signals. This screenshot has lamps turning on when anything > 0, and the rail signal next to the combinator closing when C > 0 as provided by the combinator. I noticed another issue with the screenshot itself, but that definitely belongs in another report.