Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0011189Dwarf FortressTitle Screenpublic2019-12-10 14:352019-12-11 13:35
LordBobSaget 
Loci 
immediatecrashalways
resolvedduplicate 
0.44.12 
 
0011189: Choosing to start a game on a save file that has been deleted begins an accumulation of an endless amount of memory
My PC has 16GB of RAM and dwarf fortress was using 95 percent of it before I managed to kill the process. It was showing no signs of stopping and likely would have crashed my computer if I hadn't.
1. Create a new world.
2. Go to the title screen.
3. Minimize the game and navigate to your dwarf fortress saves folder on your computer.
4. Delete the save of the world you just created.
5. Return to the game window and select "Start Playing" for the world you both just created and deleted.
6. Choose one of the three options, Dwarf Fortress, Adventurer, or Legends.
7. Try to kill the process before it bluescreens your OS.
I was using the masterwork modpack and haven't tried reproducing it on the normal game, but I'm almost certain it wouldn't make a difference.
No tags attached.
duplicate of 0010782confirmed lethosor Renaming/deleting unloaded worlds while the game is running and attempting to load them can lock up your computer 
duplicate of 0005668resolved Logical2u Freeze on "start playing" after deleting entire "save" folder while DF is running 
Issue History
2019-12-10 14:35LordBobSagetNew Issue
2019-12-11 13:31LociNote Added: 0039610
2019-12-11 13:31LociRelationship addedduplicate of 0010782
2019-12-11 13:31LociStatusnew => resolved
2019-12-11 13:31LociResolutionopen => duplicate
2019-12-11 13:31LociAssigned To => Loci
2019-12-11 13:34lethosorNote Added: 0039612
2019-12-11 13:35lethosorRelationship addedduplicate of 0005668
2019-12-11 13:38lethosorNote Edited: 0039612bug_revision_view_page.php?bugnote_id=0039612#r16132
2019-12-11 13:42lethosorNote Edited: 0039612bug_revision_view_page.php?bugnote_id=0039612#r16133
2020-08-22 17:08lethosorNote Edited: 0039612bug_revision_view_page.php?bugnote_id=0039612#r16552
2020-08-22 17:09lethosorNote Edited: 0039612bug_revision_view_page.php?bugnote_id=0039612#r16553

Notes
(0039610)
Loci   
2019-12-11 13:31   
Nicely handling an intentionally-sabotaged directory structure isn't really a priority. (0010782)
(0039612)
lethosor   
2019-12-11 13:34   
(edited on: 2020-08-22 17:09)
Note that this is a duplicate of 0005668, but I think the way DF handles this situation is a bug. I have gotten DF to crash by doing this before, so I suspect that the code that's trying to read the file ends up reading random values, and allocating varying amounts of memory based on that. If DF tries to allocate too much memory, a typical OS would kill it (although if it's allocating memory slowly enough, it may cause your OS to become unresponsive for a while).

At any rate, the advice of "don't mess with save files when DF is running" from 0005668 is good, so this probably won't be a high-priority fix when the next bug-fixing phase starts, but it's still a bug as far as I'm concerned.

Edit: Loci beat me to it. If you were modifying files that DF was actively using, I would agree; however, since this is entirely possible to trigger accidentally (deleting a save that you're not using, then accidentally selecting it from the "start playing" menu later), I think it's worth addressing.

<del>Edit 2: From testing on macOS, DF just seems to lock up without eating up memory. However, the list under "start playing" updates whenever the title screen is recreated, which happens when saving a game (or generating a world) and exiting to the title screen. I no longer think this is easy to reproduce accidentally, so I agree with Loci on this.</del>


Update: On second thought, I've decided to reopen the parent of this issue: 0010782:0040703