team-eternity / eternity

The Eternity Engine
http://eternity.youfailit.net/wiki/Main_Page
GNU General Public License v3.0
236 stars 37 forks source link

I_Error loading savegame between recent revisions. #560

Closed Catoptromancy closed 1 year ago

Catoptromancy commented 2 years ago

This is printed in the terminal after crashing while trying to load a save game. P_UnArchiveSndSeq: unknown EDF sound sequence # archived

Last build that compiles and loads the save game is commit 6bfe8bd4857c29a79fd4f8b17c2d634066d06d54

About 9 commits later the repo builds again, but save game starts crashing. First build to start crashing and compiles: commit 55cbfe3989954d0c9868edfdee3b5d3b79861068

Savegame: https://www.geocities.ws/catodemos/doom/logs/ee_logs1/etersav0.dsg

I made a whole list of compiling outcomes, if revision actually compiles, and if it crashes. Maybe this might be useful. https://www.geocities.ws/catodemos/doom/logs/ee_logs1/eesavecrash1.txt

`Command line $ eternity -file ~/Doom/pwads/eviternity.zip

Title : Eviternity (Final version) Release date : February 10th, 2019

$ md5sum eviternity.zip a2304aaa9824d0fa3467f04a5bc02262`

ioan-chera commented 2 years ago

Attached the files here for good measure.

i560-save-crash.zip

ioan-chera commented 2 years ago

PROBLEM: when testing 6bfe8bd48, with the exact same zip, with eternity.pke rebuilt from the resources, I'm getting this error instead:

WadDirectory::CacheLumpNum: 8873 >= numlumps

The actual numlumps are 8853. The lump it's trying to load is ENHANCER for ACS.

Did you update the full base directory every time you tested the versions?

I am reproducing the sndseq error, so we have a lead there at least.

Catoptromancy commented 2 years ago

I went root and did#make installfor every commit. There is no#make uninstallin the build system so base files and manpages are never removed, just copied over.

ioan-chera commented 2 years ago

To do:

ioan-chera commented 2 years ago

I've fixed the given breaking change, and also future-proofed P_ArchiveArray. The problem happened because one value was added to an enum, and an array was using the final value of that enum as length, and it was being serialized.

ioan-chera commented 1 year ago

Skipping fixing this as it's too late. It's hard to maintain savegame compatibility, but I guess we can do our best.