Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0001340Dwarf FortressPathfindingpublic2010-04-19 13:242020-09-17 14:22
Jiri Petru 
 
normalmajoralways
newopen 
0.31.03 
 
0001340: Walling off HFS kills FPS
This is apparently an old issue, but I felt it should be represented in the bug tracker :)

When you release the HFS buggers and wall them off, the FPS drops waaaay too low. Once you open the way again, the FPS shoots back up.

Footkerchief says "HFS has a tendency to spam path requests like crazy, even after you wall them off -- that's a bug that goes back to 40d and earlier," and links to several older bug reports back on the forums, here: http://www.bay12games.com/forum/index.php?topic=34311.msg1180616#msg1180616 [^]
HFS, pathfinding
related to 0000891resolved Footkerchief New HFS pathing troubles; ends up in a pathing "freeze" 
related to 0000797confirmed Footkerchief Animals/pets repeatedly try to find path through pet-locked/"tightly closed" doors, causing lag 
related to 0003164confirmed Footkerchief Severe lag during sieges due to buildingdestroyer pathfinding 
related to 0001655acknowledged Toady One Demons always path to top levels of tube 
related to 0004779new  FPS different on different z-levels 
Issue History
2010-04-19 13:24Jiri PetruNew Issue
2010-04-19 13:25Jiri PetruNote Added: 0004262
2010-04-19 13:25Jiri PetruNote Edited: 0004262bug_revision_view_page.php?bugnote_id=0004262#r1422
2010-04-19 13:25Jiri PetruNote Edited: 0004262bug_revision_view_page.php?bugnote_id=0004262#r1423
2010-04-19 13:39FootkerchiefNote Added: 0004264
2010-04-19 13:40FootkerchiefNote Edited: 0004264bug_revision_view_page.php?bugnote_id=0004264#r1427
2010-04-19 13:40FootkerchiefRelationship addedrelated to 0000891
2010-04-19 14:24king doomNote Added: 0004266
2010-04-19 14:42KennelTag Attached: HFS
2010-04-19 14:42KennelTag Attached: pathfinding
2010-11-18 16:38Jiri PetruNote Added: 0013993
2010-11-18 18:20FootkerchiefRelationship addedrelated to 0000797
2010-11-18 18:21FootkerchiefNote Added: 0013997
2010-11-19 06:08Jiri PetruNote Added: 0014012
2011-01-03 15:31Jiri PetruNote Added: 0014780
2011-01-03 15:31Jiri PetruNote Edited: 0014780bug_revision_view_page.php?bugnote_id=0014780#r5621
2011-01-03 15:32Jiri PetruNote Edited: 0014780bug_revision_view_page.php?bugnote_id=0014780#r5622
2013-09-22 17:35FootkerchiefRelationship addedrelated to 0003164
2014-01-27 08:14FootkerchiefRelationship addedrelated to 0001655
2014-01-27 08:32FootkerchiefRelationship addedrelated to 0004779
2015-05-06 15:44XolrocNote Added: 0032652
2015-05-06 15:50XolrocNote Edited: 0032652bug_revision_view_page.php?bugnote_id=0032652#r13065
2015-05-06 16:24XolrocIssue Monitored: Xolroc
2015-05-23 21:31NW_KohakuNote Added: 0032714
2020-09-17 14:22neverending_caveinNote Added: 0040740

Notes
(0004262)
Jiri Petru   
2010-04-19 13:25   
By the way, what is the policy for reposting known old bugs to the bug tracker? Is it generally encouraged, or frowned upon? Feel free to close this report if the latter.

(0004264)
Footkerchief   
2010-04-19 13:39   
(edited on: 2010-04-19 13:40)
Encouraged, AFAIK. I think the original plan was to get all the old-but-not-obsolete bugs into the tracker ASAP, but with all the scary new bugs that need fixing, it's unlikely Toady will find time for transferring the old ones. Plus, it's usually not obvious whether they're still around, so it's good to get confirmation.

(0004266)
king doom   
2010-04-19 14:24   
This is a known bug, and can be triggered by plenty of things. I've done it myself with a caravan and a totally walled off depot. In the end I had to mod everything on the map but dwarves to only be able to breathe underwater, so they all died and stopped trying to find a non existent path fifty million times per second.
(0013993)
Jiri Petru   
2010-11-18 16:38   
May I suggest stickying this bug?

Sorry for being obnoxious, but it is a very common and gamebreaking bug, only a little less bad than a crash. The FPS drops so low the game becomes almost unplayable.
(0013997)
Footkerchief   
2010-11-18 18:21   
I added a relationship to stickied bug 0000797, which is probably a worse offender (there are a lot of path-spam bugs).
(0014012)
Jiri Petru   
2010-11-19 06:08   
Thanks, that should be enough to make this report visible.
(0014780)
Jiri Petru   
2011-01-03 15:31   
(edited on: 2011-01-03 15:32)
This seems to be caused by the BUILDINGDESTROYER tag, which most probably never stops pathing.

How to "fix" this issue, courtesy of SirPenguin from SomethingAwful (Gemclod is the name of the fortress):

1. Go into your init file and change the [COMPRESSED_SAVES:YES] to [COMPRESSED_SAVES:NO]
2. Start the fort, then simply save and quit again
3. Download DF World Tinker (http://www.bay12forums.com/smf/index.php?topic=67059.0 [^])
4. Put that in your DF folder
5. Run World Tinker. First parameter, put in "GemClod". Second, put in "export". Third, put in "file.txt"
6. A file by the name of file.txt is generated in your DF folder. This contains all the raws of the active save file, which you normally cannot change
7. Open the file, and hit Control F "demon" to find the first demon
8. If you are Pozzo, or an overseer doing this, try to do this fast or without looking! You WILL spoil demon types, their syndromes, etc. etc.
9. If using Notepad, select Edit then Replace...
10. Find What: [BUILDINGDESTROYER:2] Replace with: (leave blank)
11. Now simply hit "Replace" until it says it cannot find any more instances of the tag
12. After you're done, save file.txt and close it
13. Open World Tinker again. First parameter, "GemClod". Second, "forceimport". Third, "file.txt"
14. "go", and it'll import your modified raws

Repeat steps 9-14 with any other tag we deem beneficial. I found removing [LIKES_FIGHTING] seemed to add some performance, as my FPS rose to the 20s and then back to 16/17 when I removed it. But then it hovered around 15/16 again, so who knows.

(0032652)
Xolroc   
2015-05-06 15:44   
(edited on: 2015-05-06 15:50)
I can confirm this still happens in version 40.24. Going to try Jiri Petru's fix now, hopefully it will still work.

Edit: No, apparently the program Jiri said to use hasn't been updated to support 40.24. Anyone know of another way to modify demons?

(0032714)
NW_Kohaku   
2015-05-23 21:31   
I had this happen in an extremely noticeable fashion when I had a miner wall himself off thanks to channeling straight down and not completing an exit tunnel before he wanted to go on break. I had 100 (max) FPS (first Winter), which cratered to around 15 just having this one miner try to path to either his room or the dining hall.

It may be relevant that he could hypothetically have tried pathing a climbing expedition up 100z of channel, but decided against it, only to consider it again multiple times per frame.
(0040740)
neverending_cavein   
2020-09-17 14:22   
I had this happen in 0.47.04, except that I didn't dig into the adamantine and then wall it off; I carved fortifications. And I didn't just get low FPS; DF froze for a few minutes and wouldn't respond to input during that time. The freeze started when the demons flew over to an adamantine spire (not the one that I carved fortifications in).