Page 1 of 1

[0.16.27] Crash when destroying trains

Posted: Sat Mar 03, 2018 1:02 pm
by aaargha
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:

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

Re: [0.16.27] Crash when destroying trains

Posted: Sat Mar 03, 2018 4:28 pm
by Rseding91
Thanks for the report. It's now fixed for the next version of 0.16.