If a long block signal is used on a track section with a dead end, or in other fancy situations, then if a train comes at it and fails to reserve the whole route, it is possible that some reservations do not get properly erased.
As illustrated by the example below (slightly exaggerated situation):
lbs-reservation-fails.gif
1. Reservation of the first block (blue) is attempted. It succeeds.
2. Reservation of the second block (orange) is attempted. It succeeds.
3. The reservation of block 2 is cleared.
4. Reservation of block 3 is attempted. It fails. Now the initial reservation (blue) must be cleared as well.
5. Notice how the first reservation (blue) was damaged by the second one.
6. The initial reservation (blue) is cleared. However, the unreservation routine ends when it encounters an unreserved way, so the first reservation is not fully erased.
Then, other trains may not enter the section, because of these leftover reservations.
A patch fixing that is attached to this post. Basically, instead of being kept, the first reservation is cleared before others are attempted, and re-reserved at the end if the convoi can go.
This is even much worse. The reservation is released just after the long block signal before reaching the end stop. Need more investigate more.
I think I have fixed the longblock signals. Please check r11774
Can confirm it works. Thanks!