The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Topic started by: DrSuperGood on June 10, 2018, 06:46:26 PM

Title: Bug: Train out of range due to being too close.
Post by: DrSuperGood on June 10, 2018, 06:46:26 PM
Yes the topic title pretty much explains this all... See image.

My theory is that for the final destination of a mirrored schedule it is using the return distance to the first stop, not the mirrored return distance, if it should even be using that at all seeing how I am changing the schedule from a different line in between the two stops of the new schedule. In this case it is a mirrored schedule consisting of a 43.3km hop and a 58.6km hop, with the ship sitting about 20km into the 58.6km hop. In this case both are less than the 65km maximum range of the ship so the schedule should work. However due to it being mirrored it is looking at the final stop as being 101.9km away which is out of range, either that or some total nonsense is occurring.

It might be working automatically for some of the convoys but that one is really stuck. I cannot even order it back as it suddenly adds nonsense huge distance despite being near the dock. I had to change line to another to try and fix it.
Title: Re: Bug: Train out of range due to being too close.
Post by: jamespetts on June 10, 2018, 07:07:26 PM
I am afraid that I am not able to reproduce this because, on loading the server game, convoy 7152 no longer appears to be showing the error that you describe, but rather, it is in dock. Are you able to upload a saved game where this can reliably be reproduced at a specific time and place?
Title: Re: Bug: Train out of range due to being too close.
Post by: DrSuperGood on June 10, 2018, 07:38:02 PM
It is docked as the server crashed and reloaded a state that it was not bugged in... I will experiment with recreating it over the next few days.

That said one does not even need to recreate it to know something must be wrong with the logic. It should never produce a message telling the player that the convoy is out of range by a negative distance and is in range... Possibly the logic for the dialog is not correctly coupled with the test logic? It sure looks that way by it passing the range test according to the values it shows to the user but failing internally.
Title: Re: Bug: Train out of range due to being too close.
Post by: jamespetts on June 10, 2018, 07:45:57 PM
Quote from: DrSuperGood on June 10, 2018, 07:38:02 PM
It is docked as the server crashed and reloaded a state that it was not bugged in... I will experiment with recreating it over the next few days.

That said one does not even need to recreate it to know something must be wrong with the logic. It should never produce a message telling the player that the convoy is out of range by a negative distance and is in range... Possibly the logic for the dialog is not correctly coupled with the test logic? It sure looks that way by it passing the range test according to the values it shows to the user but failing internally.

The fact that the behaviour that you saw is incorrect tells us that there is a bug - but I need a reproduction case in order to understand what the error is and thus know how to fix it. Please do let me know when you have a reproduction case.

As to the server crashing - do you have any idea what event(s) triggered this?
Title: Re: Bug: Train out of range due to being too close.
Post by: jamespetts on July 08, 2018, 04:20:59 PM
Has anyone ever managed to produce a reproduction case for this?
Title: Re: Bug: Train out of range due to being too close.
Post by: DrSuperGood on July 14, 2018, 07:02:28 AM
Fortunately not. However that is not really a good thing as I do not think anything was fixed relating to it to prevent it from happening again in future. Also many of the newer 1900 ships on the server have such massive ranges that borderline range issues are not really a problem anymore.
Title: Re: Bug: Train out of range due to being too close.
Post by: jamespetts on July 14, 2018, 08:41:59 AM
The reason that I he cause of this has not been fixed is precisely that there has never need a reproduction case for it.