[.15.10] Out of bounds train schedule crash

This subforum contains all the issues which we already resolved.
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

[.15.10] Out of bounds train schedule crash

Post by Nexela »

Code: Select all

local records = {}
for _, name in pairs ({"#SOUTH", "#EAST", "#NORTH", "#WEST"}) do
    records[#records + 1] = {station = name, wait_conditions = {{type = "time", ticks = 0, compare_type = "and"}}}
end
  records[1].wait_conditions = {{type = "full", compare_type = "and"}}
  train.schedule = {current = 0, records = records}  --<<<<< Don't set it to 0
Game crashes when opening up the locomotive to view the schedule. Fixed by setting it a valid #records number.
Attachments
factorio-current.log
(18.47 KiB) Downloaded 132 times
Rseding91
Factorio Staff
Factorio Staff
Posts: 14269
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [.15.10] Out of bounds train schedule crash

Post by Rseding91 »

Thanks for the report. I've fixed it so now trying to set the current record to an invalid index will give a script error.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Resolved Problems and Bugs”