News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

Miscellaneous issues with the one train staff working method

Started by Mariculous, August 23, 2019, 02:18:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mariculous

I have two more one_train_staff related bugs:
Sometimes the reservation does not reserve the whole track to the next one_train_staff cabinet. First I thought this only happens when using the explained exploit, but it does also occur when used at dead-end tracks.
When this happens and another train comes to a halt at the one_train_staff cabinet, the train at the cabinet will wait in drive_by_sight (or maybe any other mode it was in, but I didn't test this) but also reserve these tiles.
When the train in the one_train_staff block returns to that tile, it will come to a halt and will wait for the track to be cleared, which will never happen.
See the attached images for this.

I don't know how to exactly reproduce this but it will happen in the savegame at layouts 6 and 8, whereas layout 7, which is exactly the same as layout 8, except being rotated by 1080° does not seem to be affected.
Also, layout 10 seems to be perfectly working, which is exactly the same as layout 6, except that the cabinets are connected diagonally.
Just unlock the deadlocked trains by stopping the one waiting at the one_train_staff cabinet and clearing the reservation of that train and watch them moving. There will be a missing reservation soon that will be reserved by the train waiting at the cabinet in drive_by_sight soon.

Yet another one:
When a train has to wait at a one_train_cabinet, its reservation will be only one tile instead of the whole train length. You can see this in on the images and in layouts 5,6,7,8,9 and 10.
Other trains can then stack at the exactly same tile and this will very likely cause a wrong reservation when the staff is returned. You can see this when you start the train in the depot of layout 7.


Furthermore, at layout 9 some poor one_train_staff cabinets are being abused for some kind of perfectly working absolute block signaling, theoretically being available even before time interval signaling was invented.

Mariculous

After further testing, I expect the reservation/deadlocking bugs to be related to the following 2 bugs:
- trains arriving at a one_train_staff cabinet will immediately clear its whole reservation except for one tile.
- trains at a one_train_staff cabinet tile will _always_ start greedily reserving blocks as far as they can even if not the whole route is free.
This can bee spectated when a train in drive_by_sight mode is moving away from one_train_staff cabinet and a train is waiting there

Due to the first bug, the waiting train will start moving, when the other train is still on that track but without reservation, so they will just pass through each other.
Since a train in drive_by_sight, which is our train that just left the single tracked section, does always clear any reservation on a tile when its last car leaves that tile it will start clearing parts of the one_train_staff reservations of the entering train. The entering train will re-reservate these tiles when its first car enters that tile but the first train_length/2 tiles won't be re-reservated because the reservation will be erased after the first car had already passed that tile.
When any train arrives at the entering one_train_staff cabinet now, the second bug will reserve the first free tiles, deadlocking the system.

A workaround to this bug is to NEVER EVER place the entry one_train_staff cabinet directly adjacent to the junction.
If you do so, there will always be at least one tile after the junction reserved by the train in the single tracked area so any train waiting at the one_train_staff cabinet can not start reserving tiles of the single tracked area when it's not yet clear AND to ensure that trains do never stack up at the same tile, for example by using only 2 trains or schedules because trains stacking up at the same tile can cause deadlocks because in that case sometimes one train reserves the black and starts moving in drive_by_sight, so the other train will start reserving the tiles behind that train so it will continue to its turnaround point and deadlock the system.

jamespetts

I have split this from the original topic to comply with the requirement that each individual bug report needs to be in its own post. This is very important for me to be able to manage bug reports effectively, as I need to be able to see clearly whether any given bug is outstanding or has been fixed: any fixed bug will be moved to the solved bug reports subforum.

As with other bug reports, I will have to look into this once I have a computer that can run this sensibly; I am still awaiting optimum part availability. Given the number of reports that have accumulated, it might take some time for some of the reports to be reached.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Mariculous

There seems to be an additional issue where trains sometimes don't switch from one_train_staff -> drive_by sight or vice versa when passing a one_train_staff cabinet.
That's yet another issue I can't reproduce yet nor I have seen this in action. The only thing I see is a train of this line deadlocking with an other line because it is standing in token_block mode in the absolute_block controlled section.
This happens at my narrow gauge network which is quite simple.

I had ovserved this network for a while and everything worked as expected.

jamespetts

Are you able to upload a reliable reproduction case for this?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Mariculous

Will split this into two rather small bugs after I had some sleep.
- The ability to use it on intermediate single tracked sections
- The behavior of greedily creating reservations when the track is not free, which will lock any train in that section.

I could not reproduce the critical bugs anymore, so I guess they were fixed with some of todays changes to one_train_staff. Specifically I don't see any trains leaving one_train_staff working method without stopping there, which cleared all except the first tile of the train.
However, I will need to find the old reproduction save to confirm this.

jamespetts

Splendid, thank you: I shall await the new reports and reproduction cases.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Mariculous

This thrad can be deleted or moved. I extracted both bugs to their own bugreport.

jamespetts

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.