induktio / thinker

Improved game engine features for SMACX.
https://discord.gg/XdFuwWzzku
GNU General Public License v2.0
75 stars 11 forks source link

CTD/Crash after ending turn/Planetary Ecology report on forest growth #68

Closed ArneHD closed 5 months ago

ArneHD commented 6 months ago

I'm experiencing a crash when selecting end turn, the crash appears to happen either after or during the end turn report on forest/kelp growth.

This crash appears to happen sometime into the game and occurs both with "Thinker Mod develop build (May 16 2024)" and with the release 4.2 version.

I'd appreciate any advice for how to solve or avoid this crash. Thanks

debug.txt

Vengarr commented 6 months ago

Same issue here, I've had the same thing happen several games with the same error code. Reloading prior autosaves does not always help.

debug.txt

Vengarr commented 6 months ago

Okay, I think I may have isolated this one. It seems to be caused by the "Energy Market Crash" random event, and it was introduced sometime after 4.1. I'm just guessing, but there might be something wonky in the formula that calculates your new energy reserves.

Rolling back to 4.1 works, or you can reduce your energy credits below 1000 to keep the event from firing.

Here's a save for debugging purposes: fffff.zip

induktio commented 6 months ago

Good that you found it, there was a minor bug with the patched code related to event_market_crash option which apparently crashed the game. This should be fixed in May 22 build so you can reload the previous savegames and play the game as usual. Also the notification icon for this event is changed to genwarning_sm.pcx while it was previously markbm_sm.pcx.