News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

Bug: Train out of range due to being too close.

Started by DrSuperGood, June 10, 2018, 06:46:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DrSuperGood

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.

jamespetts

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?
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.

DrSuperGood

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.

jamespetts

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?
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.

jamespetts

Has anyone ever managed to produce a 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.

DrSuperGood

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.

jamespetts

The reason that I he cause of this has not been fixed is precisely that there has never need a reproduction case for it.
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.