the original code had two big problems, both related to "object hell". i don't remember the exact details now, but that was the reason i rewrote hell from the scratch. they mostly manifested themselves as duplicate entities and "zombie" entities. 't was currupting the saves beyound almost any repair. k8IVAN may crash mid-game, but it should not affect the saves. i believe the only way to corrupt saves in k8IVAN is to trick the game into generating a new level with missing entities/configs — this is fatal, because the game updated the save moving PC to the new level, and then failed to generate the level itself. so on loading such save it tries to load the level which doesn't exist, and considers the save broken.
i don't remember the details (and i really need to revisit that code), but i believe that the game wipes old level from memory, so it need to save it before generating a new one. it also saves current player state along with it — which actually should be done only
after the new level is generated. it's quite hard to follow the code, though, and i yet to convince myself to dive into it.