[2.0.43] Crash on start with animation and decay_animation nil on corpse prototypes (CorpsePrototype.cpp)

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

[2.0.43] Crash on start with animation and decay_animation nil on corpse prototypes (CorpsePrototype.cpp)

Post by Osmo »

1. Create a simple mod
2. Put the following code in data-updates.lua
3. Launch the game. It crashes

Code: Select all

for _, prototype in pairs(data.raw["corpse"] or {}) do
    prototype.animation = nil
    prototype.decay_animation = nil
end
This does not necessarily require animation and decay_animation, some other combinations also cause a crash
Attachments
factorio-corpse-animation-crash.log
(20.92 KiB) Downloaded 12 times
Last edited by Osmo on Mon Mar 31, 2025 8:40 pm, edited 2 times in total.
Rseding91
Factorio Staff
Factorio Staff
Posts: 15299
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.43] Crash on start with animation and decay_animation nil on corpse prototypes (CorpsePrototype.cpp)

Post by Rseding91 »

Thanks for the report. The issue was leaving animation_overlay and direction_shuffle defined for the corpses. I've added a check for the next release so it will error at startup instead of crashing if they're not also cleared.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Resolved Problems and Bugs”