Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0010782Dwarf FortressTechnical -- Saving/Loadingpublic2018-06-05 15:402020-08-23 09:02
PCWindows 10Version 1803
0010782: Renaming/deleting unloaded worlds while the game is running and attempting to load them can lock up your computer
I had the wonderful idea to launch DF, open the world folder to delete old worlds while still running DF, then try loading a now-removed world in fortress mode, which resulted in my computer freezing to the point where the power button wouldn't work.

The worlds in question were completely vanilla.

1: Launch DF
2: Create a new world, or use a world you don't want anymore for step 3
3: Go into the save folder and delete the world
4: Switch to the Dwarf Fortress window, and attempt to load the world.
5: Watch your computer itself crash while Dwarf Fortress attempts to take the data from a nonexistent folder, and overloads the system while doing so in a fruitless manner. For me, pressing the power button on my PC did not work.
6: After you're done admiring the crashed system, unplug the computer before plugging it back in.
I advise saving unsaved work before reproducing.
duplicate of 0005668resolved Logical2u Freeze on "start playing" after deleting entire "save" folder while DF is running 
has duplicate 0011189resolved Loci Choosing to start a game on a save file that has been deleted begins an accumulation of an endless amount of memory 
Issue History
2018-06-05 15:400cra_tr0perNew Issue
2018-06-05 15:420cra_tr0perTag Attached: crash
2018-06-05 15:420cra_tr0perIssue Monitored: 0cra_tr0per
2018-06-05 15:420cra_tr0perIssue End Monitor: 0cra_tr0per
2018-06-06 03:26PatrikLundellNote Added: 0038434
2018-06-06 14:40LociNote Added: 0038436
2018-06-06 14:40LociStatusnew => resolved
2018-06-06 14:40LociResolutionopen => won't fix
2018-06-06 14:40LociAssigned To => Loci
2018-06-07 07:56lethosorNote Added: 0038440
2019-12-11 13:31LociRelationship addedhas duplicate 0011189
2019-12-11 13:36lethosorRelationship addedduplicate of 0005668
2020-08-22 17:07lethosorNote Added: 0040703
2020-08-22 17:07lethosorAssigned ToLoci => lethosor
2020-08-22 17:07lethosorStatusresolved => confirmed
2020-08-22 17:07lethosorSummaryDeleting worlds while the game is running and loading them BSODs your computer => Deleting unloaded worlds while the game is running and loading them BSODs your computer
2020-08-22 17:12lethosorNote Edited: 0040703bug_revision_view_page.php?bugnote_id=0040703#r16555
2020-08-23 09:02lethosorReproducibilityalways => sometimes
2020-08-23 09:02lethosorResolutionwon't fix => open
2020-08-23 09:02lethosorSummaryDeleting unloaded worlds while the game is running and loading them BSODs your computer => Renaming/deleting unloaded worlds while the game is running and attempting to load them can lock up your computer

2018-06-06 03:26   
You claim this always happens, which implies you have repeated the process several times?

I've renamed and removed saves while DF is running and then tried to load them, which just resulted in failure. I just repeated it, and the behavior differed between using DFHack and vanilla: in vanilla DF went from the save select screen to the main screen, while DFHack remained on the game select screen, probably because the plugin allowing you to rename the save failed.

I'm using Windows 10.1.
2018-06-06 14:40   
I was also unable to reproduce this. However, even if it was 100% reproducible, most software behaves poorly when you intentionally yank file structures out from under it. Since the problem requires the user to willfully sabotage the game, and the outcome is fairly benign (as opposed to, say, corrupting the disk), I don't really see any need to modify the behavior.
2018-06-07 07:56   
I have also done something like this several times (usually renaming), but have never had it affect my system. I'd say this is almost certainly a system-specific issue, or one that happened to be caused by some other factors.
2020-08-22 17:07   
(edited on: 2020-08-22 17:12)
On second thought, I'm reopening and confirming this. It agrees with observations in 0011189, so at least some users are seeing system-wide freezes because of this. I don't think deleting a save that isn't loaded qualifies as "sabotage" - if you were using other software, e.g. Microsoft Word, and deleted a .doc file that you didn't have open, would you expect your entire computer to lock up if you attempted to load that file (e.g. from a "recents" menu)? That's essentially what's happening here.

An error message would be suitable in this case, like most other software. Maybe even a crash would be understandable. However, attempting to read from a file that doesn't exist, without detecting it, and freezing a user's entire system while doing so, is absolutely a bug in my opinion.

I'm not reopening 0005668 because that involves deleting the entire data/save folder, which the game requires (e.g. for storing temporary data in data/save/current and creating new saves). In contrast, individual region folders are user data, and as long as they aren't in use, making copies and/or removing them is acceptable.