[0.16.27] Crash when destroying trains
Posted: Sat Mar 03, 2018 1:02 pm
If the player has the "all train GUI" open (the one that shows a list of all active trains) the game can crash if trains are deleted through scripts. I've attached a log of this crash and a save in which I can reproduce it.
To use the save simply load it, open the train list and run the following script:
Whether or not the crash occurs seems to be dependant on how many trains there are, In some tests with only a few trains it did not crash.
To use the save simply load it, open the train list and run the following script:
Code: Select all
/c for _,t in ipairs(game.player.force.get_trains()) do for _,l in ipairs(t.locomotives.front_movers) do l.destroy() end end