News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

r11772 - Long block signal does not properly erase reservations in some cases

Started by Nazalassa, October 25, 2025, 09:53:38 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Nazalassa

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.
Making paksets since October 2023  |  pak48.bitlit | pak32.box | MLM for pak64 | Empire F7 cars

Life is like a multi-tasking OS: you know you'll eventually get back to everything, but you don't know when.

prissi

This is even much worse. The reservation is released just after the long block signal before reaching the end stop. Need more investigate more.

prissi

I think I have fixed the longblock signals. Please check r11774

Nazalassa

Making paksets since October 2023  |  pak48.bitlit | pak32.box | MLM for pak64 | Empire F7 cars

Life is like a multi-tasking OS: you know you'll eventually get back to everything, but you don't know when.