Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0010472Dwarf FortressTechnical -- Saving/Loadingpublic2017-12-26 11:562017-12-29 15:22
Buttery_Mess 
lethosor 
highcrashalways
acknowledgedopen 
PCWindows7, 10
0.44.02 
 
0010472: Bugged save (hanging on "Loading Occupations")
This save file contains an ordinary fortress. When loading the save file, the game hangs at "Loading occupations". The game suddenly occupies far too much memory, eating many gigabytes of vRAM if it can. Before it was last saved, the game was working normally. I attempted to load this file on two machines, the first running Windows 7 and the latter Windows 10, and the first running with 12 GB of RAM and a dual core processor, the latter running with 16 GB and a quad core processor. It's been tested on 44.02 and 44.03.
Always occurs on load.
Bugged save has been uploaded

http://dffd.bay12games.com/file.php?id=13348 [^]

Direct link

http://dffd.bay12games.com/download.php?id=13348&f=cursed+save.zip [^]
Save Included
related to 0006485resolved Footkerchief Crashing when I try to load! 
Issue History
2017-12-26 11:56Buttery_MessNew Issue
2017-12-27 04:14Buttery_MessIssue Monitored: Buttery_Mess
2017-12-27 06:30sionlifeNote Added: 0037408
2017-12-27 08:59Buttery_MessNote Added: 0037410
2017-12-29 13:56lethosorNote Added: 0037435
2017-12-29 13:56lethosorTag Attached: Save Included
2017-12-29 14:06lethosorNote Added: 0037436
2017-12-29 14:06lethosorAssigned To => lethosor
2017-12-29 14:06lethosorStatusnew => needs feedback
2017-12-29 14:06lethosorNote Edited: 0037436bug_revision_view_page.php?bugnote_id=0037436#r15117
2017-12-29 14:07lethosorNote Edited: 0037436bug_revision_view_page.php?bugnote_id=0037436#r15118
2017-12-29 14:28Buttery_MessNote Added: 0037438
2017-12-29 14:28Buttery_MessStatusneeds feedback => assigned
2017-12-29 15:21lethosorNote Added: 0037439
2017-12-29 15:21lethosorRelationship addedrelated to 0006485
2017-12-29 15:22lethosorStatusassigned => acknowledged
2017-12-29 17:58lethosorNote Edited: 0037439bug_revision_view_page.php?bugnote_id=0037439#r15120

Notes
(0037408)
sionlife   
2017-12-27 06:30   
That's strange, when I tried to load it, it gets stuck on loading identities for me. i am using vanilla 44.03 Mac version. What version did you use to generate the world, was it post 44.01? I know that there were a lot of changes to identities from 43.05.
(0037410)
Buttery_Mess   
2017-12-27 08:59   
It was generated in 44.02 in 64 bit. I think I've had it get stuck on a different stage of loading before, but I couldn't repeat it and I can't remember what stage it was.

This is a vanilla save file. Judging from the enormous amount of VRAM it gobbles up, I'm guessing it causes a memory leak.
(0037435)
lethosor   
2017-12-29 13:56   
What you're seeing on the screen might not be the exact stage it gets stuck in - it could hang before the screen has had time to update (i.e. before render() was called).
(0037436)
lethosor   
2017-12-29 14:06   
(edited on: 2017-12-29 14:07)
I ran this through df-savecheck (https://github.com/lethosor/df-savecheck [^]) and got the following output for world.sav:

world.sav: Save version 0.44.02 (1597)
world.sav: chunk 16194: Compression error: unexpected EOF
world.sav: 9132833 bytes unread


It looks like this file is corrupted somehow, but not truncated. (Note that none of the other *.dat files appear to be corrupted.)

Did you kill DF when saving at any point (or did it crash)? Is it possible that you ran two instances of DF out of the same folder?

(0037438)
Buttery_Mess   
2017-12-29 14:28   
Not as far as I remember- I only run one instance of DF at a time, and I always allow DF to save before quitting. Unless I kill the process for um... reasons. But, I didn't kill the process during the save, as far as I remember. I was looking forward to continuing with the fort when I went to load it, which means I didn't kill the process out of frustration. It didn't crash.

I wish I could tell you more, this was quite unexpected
(0037439)
lethosor   
2017-12-29 15:21   
(edited on: 2017-12-29 17:58)
It looks like every byte in world.sav starting with byte 47185920 (which is in that chunk) is 0x00. Definitely some sort of save corruption. My best advice is to restore it from a backup if you can.

Are you (or were you) short on disk space? What kind of disk do you have (SSD, HDD)?

I'm not sure if there's anything we can do about it. The closest issue to this I can find is 0006485, which was closed because it was impossible to reproduce. I'm inclined to keep this open in case it is something related to DF's saving/compression code, but I really don't know if this is a DF issue or just incredibly bad luck.