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

This subforum contains all the issues which we already resolved.
Osmo
Long Handed Inserter
Long Handed Inserter
Posts: 65
Joined: Wed Oct 23, 2024 12:08 pm
Contact:

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

Post 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 19 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.
Attachments
factorio-current.log
(11.29 KiB) Downloaded 20 times
Rseding91
Factorio Staff
Factorio Staff
Posts: 15689
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post by Rseding91 »

Thanks for the report. This is now fixed for the next release.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Resolved Problems and Bugs”