The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Topic started by: DrSuperGood on February 21, 2018, 06:29:57 AM

Title: Bug: Reversing drive by sight convoy does not clean up way reservation.
Post by: DrSuperGood on February 21, 2018, 06:29:57 AM
If one orders a drive by sight convoy to reverse direction it does not free up the way reservations for the original direction. At least according to the block reservation view UI. These will be freed on map reload.
Title: Re: Bug: Reversing drive by sight convoy does not clean up way reservation.
Post by: jamespetts on February 21, 2018, 11:08:23 PM
Thank you for the report. Are you able to upload a saved game in which this issue can reliably be reproduced in a specific place at a specific time?
Title: Re: Bug: Reversing drive by sight convoy does not clean up way reservation.
Post by: DrSuperGood on February 22, 2018, 12:54:09 AM
Load save. Press shift+B to enable block view. Notice how blocks are reserved behind the direction the train is going.

To recreate use a similar setup. When the convoy is half way between the stops start ordering it in opposite directions and allow it to advance a few tiles until it makes new block reservations. Keep repeating this until it eventually breaks and leaves a huge reservation behind it. The result is what is visible in the save.

I do not know if this is block reserve UI only or if it effects game play. I think it effects gameplay judging by what some of my convoys did on the server.
Title: Re: Bug: Reversing drive by sight convoy does not clean up way reservation.
Post by: jamespetts on February 22, 2018, 01:12:02 AM
I am afraid that I am having trouble reproducing this. Can you be more specific about the precise steps necessary to reproduce this reliably? It must be deterministic, or else players would be repeatedly losing synchronisation with the server.
Title: Re: Bug: Reversing drive by sight convoy does not clean up way reservation.
Post by: DrSuperGood on February 22, 2018, 01:26:31 AM
Immediately upon load pause and select the convoy. Change schedule to the other stop it is not currently going to, the line only has 2 stops. Enable block view with shift+B. Resume.

Watch as the convoy reaches the end of its currently reserved block, reserves more and then leaves its original block reservation intact behind it. Once it reaches its stop all block reservations are undone, but until then that bit of the line behind it will remain reserved acording to the UI.

Note this save file is different from the last, please download again.
Title: Re: Bug: Reversing drive by sight convoy does not clean up way reservation.
Post by: jamespetts on February 22, 2018, 01:36:48 AM
That is very odd - I am afraid that I still cannot reproduce this. When I close the schedule window and then resume, on resuming, the block heading towards land stop 1 Railway Station is unreserved immediately. I should note that I have downloaded the latest version of the save. The behaviour is the same whether I pause before or after closing the schedule window.
Title: Re: Bug: Reversing drive by sight convoy does not clean up way reservation.
Post by: nochiu on February 22, 2018, 05:23:21 AM
I can see the bug in latest nightly.
Title: Re: Bug: Reversing drive by sight convoy does not clean up way reservation.
Post by: jamespetts on April 21, 2018, 09:58:52 PM
Can anyone confirm whether this bug can be reproduced? I was never able to reproduce this, so have been unable to attempt to fix it (if it still exists).
Title: Re: Bug: Reversing drive by sight convoy does not clean up way reservation.
Post by: waerth on April 22, 2018, 09:28:27 AM
I have had this bug when two trains try to use the same track in opposite directions. I reverse one of the 2 trains but the other will then stay stuck saying waiting for clearance. Not untill I delete all the tracks and rebuild is the clearance removed
Title: Re: Bug: Reversing drive by sight convoy does not clean up way reservation.
Post by: jamespetts on April 22, 2018, 01:03:06 PM
Are you able to upload a saved game in which this can reliably be reproduced at a specific time and place?
Title: Re: Bug: Reversing drive by sight convoy does not clean up way reservation.
Post by: waerth on April 22, 2018, 07:16:33 PM
I just found out about the b button and build some unrealistic trackconfigs to solve things :p
Title: Re: Bug: Reversing drive by sight convoy does not clean up way reservation.
Post by: jamespetts on May 04, 2018, 10:57:53 PM
Has anyone been able to produce a saved game in which this issue can reliably be reproduced at a specific time and place?
Title: Re: Bug: Reversing drive by sight convoy does not clean up way reservation.
Post by: Rollmaterial on May 04, 2018, 11:14:49 PM
It should happen when you open and close the schedule editor of a train while it is travelling diagonally. It will then "reverse" without actually reversing.
Title: Re: Bug: Reversing drive by sight convoy does not clean up way reservation.
Post by: jamespetts on May 04, 2018, 11:22:05 PM
Thank you for that. I tried to reproduce this, but cannot fully reproduce this: there is the odd reversing, but I did not see any problems with way reservations. I believe that the mis-positioning of the train in this situation comes from Standard, as I have not altered the code for vehicle positioning: can anyone confirm whether this is the case?