Removing a mod causes savegame corruption
burdoto opened this issue ยท 7 comments
Describe the bug
Removing a Mod from an existing savegame may cause AE2 to act up massively in such a way that breaks the chunk and takes all subpart network components with it.
How to reproduce the bug
- Create a fabric server with AE2 and another mod; e.G. in our case Fabricae Ex Nihilo
- Create an ME Network with at least one crafting CPU
- Save the game, make sure to have the crafting CPU work on an item from the other mod; in our case Silt from Sand, in the moment of saving
- Stop server and remove the other mod
- Start server back up
- Server is not able to start again, always resulting in the shared exception; leaving the server in a stalled state and requiring a force shutdown, when a crash report was already written to disk
Note that the crafting task in our case involves in-world crafting through a pattern provider heading into a subnet that uses formation planes to place the sand block at the target location, where a create deployer would use a hammer on it.
Expected behavior
AE2 should ignore and void all item types that are no longer in the game; and remove all impossible crafting jobs.
Additional details
I'm not entirely sure if the damage to the savegame is caused directly by this crash, or rather a side effect of server stalling and being unable to complete a save cycle.
What I know is that the chunk which contained the "faulty" crafting CPU ended up in a state where
- all subpart components were voided
- all storage cells were voided from inside disk drives
- some parts of a multiblock ME Controller were voided
Unfortunately, this one chunk in our case happened to be the same chunk that also holds my ME Core AND storage cell rack. Huge bummer.
The final state, after being able to load the world again in another client:
I think it's fairly clear that there is a hot bunch of cells missing in the rack, theres a lot of cables + p2p buses missing and a couple of parts of the controller itself, at the top. Unfortunately, I don't have a "before" picture. The cables on the right side are cut off clearly on the chunks border.
Which minecraft version are you using?
1.20
On which mod loaders does it happen?
Fabric
Crash log
https://gist.github.com/burdoto/49cadd6b7dbd0a885f89e8cf9d37b750
I totally forgot about C2ME being in the pack, but now that you mention it, I understand why you would suggest that.
Please allow some time to investigate this approach.
Hello, sorry to bother! Recently a server i play on has encountered this same bug and we are currently in the process of trying to recover the corrupted world. If you could provide a more in-depth step by step on what you did to make the world load again, that would be amazing. Thank you!
Hello, sorry to bother! Recently a server i play on has encountered this same bug and we are currently in the process of trying to recover the corrupted world. If you could provide a more in-depth step by step on what you did to make the world load again, that would be amazing. Thank you!
Hi! Do you happen to know if the mod they mentioned, c2me, is also in your modpack? (I'm trying to figure out if this bug happens still without this mod)
It's likely that this can still happen if you don't have C2ME but I'd like to be sure.
Generally it's not really a supported case that you remove a mod when you are still crafting an item from that mod.
Workaround: Re-add the mod, cancel all crafts and then remove it.
Hello, sorry to bother! Recently a server i play on has encountered this same bug and we are currently in the process of trying to recover the corrupted world. If you could provide a more in-depth step by step on what you did to make the world load again, that would be amazing. Thank you!
Hi! Do you happen to know if the mod they mentioned, c2me, is also in your modpack? (I'm trying to figure out if this bug happens still without this mod)
I checked and no; the only AE2 related mods we had were of course the mod itself, and then a compatibility mod with "Polymorph". We have also found entirely removing AE2 does'nt fix it serverside, despite me being able to replicate the bug in single player and the solution working there. I am very confused.
Unsure what could be causing this!
I have done some experimenting with the reproduction using this serverpack.
First, with all AE2, C2ME and again FEN as the mod being removed, the problem was easily reproducible. A simple setup suffices:
After removing C2ME, the problem still came up in the same manner as before, so its not related to that.
I have tried adding FEN back to the mods after encountering the crash again in an attempt to make the world usable again, without such luck; the same error as before keeps coming up, showing that savegames really do get corrupted beyond usability.
To assist possible further development of a recovery option, I have made copies of the world folder before and after the corruption, although reproduction is really straightforward, as described above.
Furthermore, what steps were necessary to recover our world to a working state is currently unknown to me, as this process was not performed by me. I will get back with this information ASAP.