You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Autoreplace operates incorrectly when a free-wagon chain is created that temporarily exceeds the train length limit by more a vehicle length, such that attempts to sell or move a vehicle in the free wagon chain fail as the remaining chain length still exceeds the limit.
This can manifest as:
If wagon removal is off, an ever-growing wagon chain which the player is not charged for can be created by requesting an autoreplace of short wagons with long ones. (See group A in the save).
If wagon removal is on, an assertion failure can be triggered if the depot already contains a free wagon chain of the maximum length. (See group B in the save).
Otherwise valid autoreplace operations can be blocked with a train too long error message if the depot already contains a free wagon chain of the maximum length. (See groups C vs D in the save).
Also for the case of group A, the "infinite free wagons" trick can and will reduce the game to <1 TPS and <1 FPS after some time has passed. The same trick can even cause the same crash as in #8295 (stack overflow in Vehicle::PreDestructor), which the free wagon chain limit was supposed to protect against.
JGRennison
added a commit
to JGRennison/OpenTTD-patches
that referenced
this issue
May 15, 2021
Version of OpenTTD
1da0ba9
Expected result
Autoreplace operates correctly.
Actual result
Autoreplace operates incorrectly when a free-wagon chain is created that temporarily exceeds the train length limit by more a vehicle length, such that attempts to sell or move a vehicle in the free wagon chain fail as the remaining chain length still exceeds the limit.
This can manifest as:
OpenTTD/src/autoreplace_cmd.cpp
Line 601 in 1da0ba9
Steps to reproduce
Autoreplace Testing Ltd, 1980-03-12.sav.zip
The text was updated successfully, but these errors were encountered: