In my game which started in 1950 and went on into 1993 all trams (even on unlinked tracks) suddenly went to a negative speed where they're unable to move. Clicking the schedule button to make them recalculate their route did not help. If a bit of track that is reserved is clicked it shows some insanely large figure for speed for the reserving vehicle suggesting that some kind of integer/buffer overflow is taking place. Restarting the vehicle by clicking the schedule button and then closing the window works intermittently. I have no idea how to reproduce it. I've tried running a circuit with similar trams in a separate save and the fault did not develop.
I'm on the latest build (c5c9a97 as of today) and here is my save
https://ufile.io/frcdtvlk
Oh, maybe this issue is involved.
https://forum.simutrans.com/index.php/topic,21334.msg198466.html
EDIT:
Ahh, I thought it was just an error in the expression and fixed it, but the variables were also wrong.
max_speed_drive_by_sight_tram must be max_speed_drive_by_sight_tram_kmh.
file->rdwr_long(max_speed_drive_by_sight_tram_kmh);
max_speed_drive_by_sight_tram = kmh_to_speed(max_speed_drive_by_sight_tram_kmh);
I have pull-requested a countermeasure to this. #471.
However, tram that is already behaving strangely needs to be rescheduled. Is it possible to improve this further?
The fix is to replace the default values to fix the broken setting values.
Anyway, I didn't implement this so I don't know much about how it works. There may be a better solution. Please check again.
This fix, together with a supplemental fix, have been implemented on the current nightly - I should be grateful if people could confirm whether this is now working.
It hasn't occurred since the update so I assume it's been fixed now.