JGRennison / OpenTTD-patches

OpenTTD - http://www.openttd.org/ - with additional patches
Other
545 stars 126 forks source link

[Crash]: Assertion failed... - autoreplace trains #692

Closed darkwaiter closed 2 months ago

darkwaiter commented 2 months ago

Version of OpenTTD

OpenTTD jgrpp 0.59

Steps to reproduce

  1. load save
  2. wait till game attempts train replacement
  3. game crashes with message "Assertion failed at line 781 of /scr/autoreplace_cmd.cpp:Train::From(new_head)-> gcache.cached_total_length <= _settings_game.vehicle.max_train_length * TILE_SIZE"

Upload crash files

crash-20240509T122221Z.zip

JGRennison commented 2 months ago

The maximum train length setting is 7 tiles, but you're running trains longer than that (as a single unit), the DB BR 407 at 7.5 tiles.

In the short term, you should either increase the maximum train length setting or stop using this or other consists which are longer than the maximum train length setting.

JGRennison commented 2 months ago

See also: https://github.com/OpenTTD/OpenTTD/issues/12651

darkwaiter commented 2 months ago

Thank you all for the hint. Will change the settings...