Page 1 of 1

[2.0.47] Crash loading a save when type of a cargo wagon inside an undo action changed to inifinity cargo wagon

Posted: Fri May 09, 2025 11:07 am
by Osmo
1. Create a mod with following code in data.lua

Code: Select all

local flatbed_wagon = table.deepcopy(data.raw["cargo-wagon"]["cargo-wagon"])
flatbed_wagon.type = "infinity-cargo-wagon"
flatbed_wagon.name = "flatbed-wagon"
flatbed_wagon.placeable_by = {item="flatbed-wagon", count=1}
flatbed_wagon.minable = {mining_time = 1, result = "flatbed-wagon"}
data:extend{flatbed_wagon}

data:extend{
    {
        type = "item-with-entity-data",
        name = "flatbed-wagon",
        icon = "__base__/graphics/icons/cargo-wagon.png",
        icon_size = 64,
        place_result = "flatbed-wagon",
        stack_size = 5
    },
}
2. Load the following save file (syncing mods is not necessary):
icg-crash3.zip
(357.34 KiB) Downloaded 31 times
3. Game crashes

To make the save file, i commented out the line

Code: Select all

flatbed_wagon.type = "infinity-cargo-wagon"
, restarted the game and placed the flatbed wagon from the editor, which placed it into the undo queue.

Re: [2.0.47] Crash loading a save when type of a cargo wagon inside an undo action changed to inifinity cargo wagon

Posted: Fri May 09, 2025 12:46 pm
by Rseding91
Thanks for the report. This is now fixed for the next release.