Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0006681Dwarf FortressTechnical -- Generalpublic2014-07-08 11:222014-07-18 13:02
ArmokGoB 
Toady One 
highcrashhave not tried
resolvedfixed 
WindowsWindows 7 64-Bit6.1
0.40.01 
0.40.02 
0006681: Autosave causes save corruption and crashes on load
I have noticed that the game tends to crash on load if a player fort exists in it. It doesn't matter if it's active, retired, or abandoned.
Save file with abandoned fortress: https://dl.dropboxusercontent.com/u/87322559/DF%20Crash.zip [^]

I have tried each method, but have not tried to reproduce any of them.
No tags attached.
has duplicate 0006687resolved Dwarfu Game won't load saved world [Fortress Mode / Agreements] 
has duplicate 0006624resolved Footkerchief Crash on loading save file in Fortress mode (Track Information) 
has duplicate 0006661resolved Dwarfu Crash when loading [Fortress Mode / Cultural Identities] 
has duplicate 0006609resolved Footkerchief Dwarf Mode frequently crashes shortly after loading a saved game 
has duplicate 0006606resolved Dwarfu starting a new game in a world with a retired (not abandoned) fort causes a crash 
has duplicate 0006703resolved Footkerchief Segmentation fault on world load after retiring a saved fort 
has duplicate 0006652resolved Footkerchief Unpausing after loading a save game causes crash 
has duplicate 0006746resolved Dwarfu Game crashes whenever I load the save of my fortress 
has duplicate 0006824resolved Footkerchief Crash on loading old save (child of 0006681?) 
has duplicate 0006825resolved Dwarfu Game Crashes when selecting continue playing 
has duplicate 0006786resolved Dwarfu Crashes loading fortress [Fortress Mode / World Info] 
has duplicate 0006809resolved Footkerchief Crash on unpause after loading [Fortress Mode / c0000094 Divide By Zero] 
has duplicate 0006839resolved Dwarfu Crash during load [Fortress Mode / Formations] 
has duplicate 0006790resolved Dwarfu Crash loading save 
has duplicate 0006858resolved Dwarfu crash while "loading civilized populations..." 
has duplicate 0006783resolved Dwarfu Crash during load [Fortress Mode / Army Controllers] 
has duplicate 0006881resolved Footkerchief crash after fortress load 
has duplicate 0006802resolved Footkerchief Crash occurrs 10 seconds after loading save 
has duplicate 0006629resolved Dwarfu Game crashes on Load world [Fortress Mode / History] 
has duplicate 0006760resolved Footkerchief CTD -- After embark, crash within 3-5 seconds 
has duplicate 0006864resolved Footkerchief Segfault after unpausing saved game in Dwarf Mode 
has duplicate 0006567resolved Dwarfu Game crashes randomly during play, no identifiable trigger event 
has duplicate 0006633resolved Footkerchief Floating point crash 
has duplicate 0006728resolved Footkerchief Crash on reload of saved Fortress 
has duplicate 0006565resolved Footkerchief Crash for unknown reason while game simply running in the background unattended 
has duplicate 0007271resolved Footkerchief New fort crashes after retiring previous fort 
has duplicate 0006631resolved Footkerchief Instant Crash on "unpause" in dwarf mode 
has duplicate 0006827resolved Dwarfu This save crashes a few seconds after loading it 
has duplicate 0006572resolved Footkerchief Crash on second time loading world 
has duplicate 0006617resolved Footkerchief Immediate crash after loading and unpausing dwarf mode save 
related to 0006523confirmed Footkerchief Crash after generating world and immediately reclaiming/unretiring a worldgen fortress 
Issue History
2014-07-08 11:22ArmokGoBNew Issue
2014-07-08 12:12DwarfuRelationship addedparent of 0006687
2014-07-08 12:13DwarfuRelationship addedparent of 0006624
2014-07-08 12:18DwarfuNote Added: 0025117
2014-07-08 12:18DwarfuAssigned To => Dwarfu
2014-07-08 12:18DwarfuStatusnew => acknowledged
2014-07-08 12:18zanzammarNote Added: 0025118
2014-07-08 12:31DwarfuRelationship addedparent of 0006661
2014-07-08 12:44DwarfuRelationship addedparent of 0006609
2014-07-08 12:45DwarfuRelationship addedrelated to 0006523
2014-07-08 12:47DwarfuRelationship addedparent of 0006606
2014-07-08 13:03FootkerchiefRelationship addedhas duplicate 0006703
2014-07-08 13:05DwarfuSticky IssueNo => Yes
2014-07-08 17:04DwarfuRelationship addedparent of 0006738
2014-07-08 17:05DwarfuRelationship addedparent of 0006652
2014-07-08 17:16JarathorNote Added: 0025186
2014-07-08 18:14DwarfuRelationship addedparent of 0006746
2014-07-09 05:24LemundeIssue Monitored: Lemunde
2014-07-09 07:31FootkerchiefRelationship addedrelated to 0006824
2014-07-09 08:00killhourNote Added: 0025304
2014-07-09 08:38killhourNote Edited: 0025304bug_revision_view_page.php?bugnote_id=0025304#r9449
2014-07-09 09:17DwarfuRelationship addedhas duplicate 0006825
2014-07-09 09:43DwarfuRelationship addedparent of 0006786
2014-07-09 09:45DwarfuRelationship addedparent of 0006809
2014-07-09 10:46ronnidewormNote Added: 0025352
2014-07-09 11:53shoopNote Added: 0025360
2014-07-09 12:03ArmokGoBNote Added: 0025362
2014-07-09 13:29EvilTwinIssue Monitored: EvilTwin
2014-07-09 14:36DwarfuRelationship addedparent of 0006839
2014-07-09 14:41DwarfuRelationship addedparent of 0006790
2014-07-09 14:57DwarfuRelationship addedparent of 0006858
2014-07-09 15:04DwarfuRelationship addedrelated to 0006843
2014-07-09 15:13DwarfuRelationship addedparent of 0006783
2014-07-09 15:21FootkerchiefRelationship addedrelated to 0006881
2014-07-09 15:21FootkerchiefRelationship addedrelated to 0006802
2014-07-09 15:28DwarfuRelationship addedparent of 0006629
2014-07-09 17:07FootkerchiefRelationship addedrelated to 0006760
2014-07-09 19:44FootkerchiefRelationship addedrelated to 0006900
2014-07-09 23:22Toady OneNote Added: 0025490
2014-07-10 00:52newjrmint15Note Added: 0025494
2014-07-10 01:07thewonderidiotNote Added: 0025496
2014-07-10 01:16Toady OneNote Added: 0025497
2014-07-10 03:03LemundeNote Added: 0025502
2014-07-10 03:05LemundeNote Edited: 0025502bug_revision_view_page.php?bugnote_id=0025502#r9508
2014-07-10 06:22DwarfuNote Added: 0025521
2014-07-10 08:24JodeNote Added: 0025537
2014-07-10 08:53thewonderidiotNote Added: 0025541
2014-07-10 09:23Toady OneNote Added: 0025546
2014-07-10 09:23Toady OneStatusacknowledged => resolved
2014-07-10 09:23Toady OneFixed in Version => Next Version
2014-07-10 09:23Toady OneResolutionopen => fixed
2014-07-10 09:23Toady OneAssigned ToDwarfu => Toady One
2014-07-10 09:30FootkerchiefRelationship addedhas duplicate 0006864
2014-07-10 09:30FootkerchiefIssue Monitored: Dirst
2014-07-10 09:30FootkerchiefIssue Monitored: yaypapaya
2014-07-11 00:45DwarfuRelationship addedparent of 0006567
2014-07-11 10:45FootkerchiefRelationship replacedhas duplicate 0006760
2014-07-11 10:45FootkerchiefRelationship deletedrelated to 0006843
2014-07-11 10:46FootkerchiefRelationship replacedhas duplicate 0006881
2014-07-11 10:46FootkerchiefRelationship replacedhas duplicate 0006809
2014-07-11 10:46FootkerchiefIssue Monitored: snateraar
2014-07-11 10:46FootkerchiefRelationship replacedhas duplicate 0006746
2014-07-11 10:47FootkerchiefRelationship replacedhas duplicate 0006839
2014-07-11 10:48FootkerchiefRelationship replacedhas duplicate 0006802
2014-07-11 10:51FootkerchiefRelationship replacedhas duplicate 0006567
2014-07-11 10:51FootkerchiefIssue Monitored: Draaven
2014-07-11 10:52FootkerchiefRelationship replacedhas duplicate 0006609
2014-07-11 10:52FootkerchiefIssue Monitored: asneakyfatcat
2014-07-11 10:53FootkerchiefRelationship replacedhas duplicate 0006786
2014-07-11 13:05DirstIssue End Monitor: Dirst
2014-07-12 08:35FootkerchiefSummaryGame crash after loading game with player fort in it => Game crash after loading game with player fort in it (save corruption)
2014-07-12 10:47FootkerchiefRelationship addedhas duplicate 0006633
2014-07-12 12:17FootkerchiefRelationship replacedhas duplicate 0006606
2014-07-12 12:17FootkerchiefRelationship replacedhas duplicate 0006858
2014-07-12 12:21FootkerchiefRelationship replacedhas duplicate 0006629
2014-07-12 12:22FootkerchiefRelationship deletedrelated to 0006900
2014-07-12 12:22FootkerchiefRelationship deletedparent of 0006738
2014-07-12 12:23FootkerchiefRelationship replacedhas duplicate 0006824
2014-07-12 12:24FootkerchiefRelationship replacedhas duplicate 0006783
2014-07-12 12:25FootkerchiefSummaryGame crash after loading game with player fort in it (save corruption) => Autosave causes save corruption and crashes on load
2014-07-12 12:26FootkerchiefRelationship addedhas duplicate 0006728
2014-07-12 12:26FootkerchiefRelationship replacedhas duplicate 0006624
2014-07-12 12:26FootkerchiefRelationship replacedhas duplicate 0006687
2014-07-12 12:27FootkerchiefRelationship replacedhas duplicate 0006661
2014-07-12 12:27FootkerchiefIssue Monitored: funnyruler
2014-07-12 12:27FootkerchiefRelationship replacedhas duplicate 0006790
2014-07-12 12:27FootkerchiefIssue Monitored: haeal
2014-07-12 12:28FootkerchiefRelationship replacedhas duplicate 0006652
2014-07-14 11:04FootkerchiefRelationship addedhas duplicate 0006565
2014-07-14 11:05FootkerchiefRelationship addedhas duplicate 0007271
2014-07-14 11:25FootkerchiefRelationship addedhas duplicate 0006631
2014-07-14 11:28FootkerchiefRelationship addedhas duplicate 0006827
2014-07-14 11:30FootkerchiefRelationship addedhas duplicate 0006572
2014-07-14 11:30FootkerchiefIssue Monitored: dudeami
2014-07-14 11:30FootkerchiefIssue Monitored: SixtyNuggets
2014-07-16 07:20FootkerchiefRelationship addedhas duplicate 0006617
2014-07-16 07:20FootkerchiefIssue Monitored: elcr111
2014-07-18 13:02DwarfuSticky IssueYes => No

Notes
(0025117)
Dwarfu   
2014-07-08 12:18   
Various forms of crashes are appearing in reports for loading fortress mode saves, so I'm acknowledging this and placing the others as children for now.
(0025118)
zanzammar   
2014-07-08 12:18   
I am having the same issue. I created a fort and saved after some playtime. The game continuously crashed when loading the fort. I scrubbed the save and created a second fort then saved just after embark. The second save will also not load. This is a serious show-stopper bug.

The crash occurs when the loading screen has the "Loading world information" message on the loading bar.

Windows 7 spits out this error report on crash:
Problem Event Name: APPCRASH
  Application Name: Dwarf Fortress.exe
  Application Version: 0.0.0.0
  Application Timestamp: 53bb189a
  Fault Module Name: Dwarf Fortress.exe
  Fault Module Version: 0.0.0.0
  Fault Module Timestamp: 53bb189a
  Exception Code: c0000005
  Exception Offset: 00455c47
  OS Version: 6.1.7601.2.1.0.256.1
  Locale ID: 1033
  Additional Information 1: 0a9e
  Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
  Additional Information 3: 0a9e
  Additional Information 4: 0a9e372d3b4ad19135b953a78882e789


I believe c0000005 code is an access violation?

And the save for the second fort, just after embark:
https://drive.google.com/file/d/0B6DAm30aqp9nZTBqbnk5UEVId1U/edit?usp=sharing [^]
(0025186)
Jarathor   
2014-07-08 17:16   
I imagine you have enough to work on now, but since I already uploaded a save to DFFD with the exact same problem (crashes on "loading world information," exception code 0xc0000005, fault offset 0x00455c47), I might as well link it here. I hope it helps. http://dffd.wimbli.com/file.php?id=8767 [^]
(0025304)
killhour   
2014-07-09 08:00   
(edited on: 2014-07-09 08:38)
Here's another save that crashes. This one doesn't crash immediately - takes a few seconds after unpause.

http://dffd.wimbli.com/file.php?id=8792 [^]

Edit:

Running DF through a debugger, it keeps faulting on a divide by 0 in the same place.

(2594.8d4): Integer divide-by-zero - code c0000094 (!!! second chance !!!)
eax=00000000 ebx=14549a90 ecx=00000000 edx=00000000 esi=00000000 edi=00000000
eip=01abe0cb esp=03fef350 ebp=00000000 iopl=0 nv up ei pl zr na pe nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010246
Dwarf_Fortress+0x8de0cb:
01abe0cb f7f1 div eax,ecx

Changing register ecx to 1 instead of 0 allows the game to continue normally, but it gets reset to 0 a few seconds later, causing the same issue.

(0025352)
ronnideworm   
2014-07-09 10:46   
I've got a similar crash, the game crashes consistently right after the miners return from their drinking break (replicated it 5 times)

http://dffd.wimbli.com/file.php?id=8803 [^]
(0025360)
shoop   
2014-07-09 11:53   
I think I've been seeing the same thing with retired adventurers, not just retired fortresses.
(0025362)
ArmokGoB   
2014-07-09 12:03   
Haven't had that happen yet, shoop.
(0025490)
Toady One   
2014-07-09 23:22   
I've identified identical issues in three of the saves that would lead to trouble. The problem is getting the root cause to reproduce. Just starting a fort, retiring, and then starting a new game are not sufficient -- the potential problem data is fine. I wonder if the first fort has to be played for long enough for some trigger to corrupt the relevant data. I'm going to continue poking around.
(0025494)
newjrmint15   
2014-07-10 00:52   
i seem to be having the exact same issue, except it happens after an adventurer dies or is retired. the next time i start adventure mode it will crash on me.
(0025496)
thewonderidiot   
2014-07-10 01:07   
For reproducibility, it seems to me that the thing that causes crashing during save loading is when I manually save the game -- seasonal saves have been mostly fine for me. Moreover if I load a save and then immediately save again, I get a save that can no longer load probably 80% of the time. Here's a save that can be caused to bug out, but loads correctly: http://dffd.wimbli.com/file.php?id=8829 [^]
(0025497)
Toady One   
2014-07-10 01:16   
Yeah, that save has the same issue already. I'm not sure why the seasonal saves are any more stable, but all of the interactions are corrupted there. I'm not sure what's causing that to happen yet, of course.
(0025502)
Lemunde   
2014-07-10 03:03   
(edited on: 2014-07-10 03:05)
After some testing I think I may have tracked the cause down to something to do with INITIAL_SAVE being set to YES on a new fort. Setting this to NO allows my to play past the first few minutes and saving without my world becoming corrupted. I suspect something similar happens with seasonal and yearly saves being active, which would explain why this has been happening to my forts so early on and a bit later for other people.

Somehow, autosaves appear to be corrupting data causing normal saves and potentially future autosaves to become corrupted. In the short term this could be handled simply by disabling autosaves, although I haven't done any further testing to ensure that this completely solves the problem.

(0025521)
Dwarfu   
2014-07-10 06:22   
FYI, Lemunde's forum thread on player-testing of this bug is here:
http://www.bay12forums.com/smf/index.php?topic=140133.msg5457596#msg5457596 [^]
(0025537)
Jode   
2014-07-10 08:24   
Additionally, for me at least, in both of my worlds where I have this error it always crashes on "Loading tracking information".
(0025541)
thewonderidiot   
2014-07-10 08:53   
+1 to what Lemunde said. I haven't enabled INITIAL_SAVE, but manual saves being dead when made after an autosave has taken place during the same play session is completely consistent with all of my bad saves so far, I think. I'm guessing that the interactions save function is destructive (or something else alters them), such that any subsequent save without exiting the game will be corrupt.
(0025546)
Toady One   
2014-07-10 09:23   
Yeah, all auto-saves appear to be wiping the random object data, and the game isn't happy to continue playing and saving after that. Hopefully I'll be able to post a fix release today (have to code it first, and there's one non-trivial issue in doing that).