Page 1 of 1

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

Posted: Mon Mar 31, 2025 8:37 pm
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

Re: [2.0.43] Crash during loading when setting animation and decay_animation to nil on corpse prototypes

Posted: Mon Mar 31, 2025 8:38 pm
by Loewchen
Post the log please, see 3638.

Re: [2.0.43] Crash during loading when setting animation and decay_animation to nil on corpse prototypes

Posted: Mon Mar 31, 2025 8:39 pm
by Osmo
Sorry, updated now

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

Posted: Wed Apr 02, 2025 4:58 pm
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.