View Issue Details

IDProjectCategoryView StatusLast Update
0011087Dwarf FortressDwarf Mode -- Raidspublic2019-09-05 17:43
Reporterslucerne Assigned ToLoci  
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionduplicate 
PlatformPCOSMAC OSXOS Version10.13.5
Product Version0.44.12 
Summary0011087: Memory leak when squad can't path to edge of map
DescriptionExperienced a huge memory leak. FPS was sitting at 200, and then dropped to about 5-10 FPS consistently for 20 minutes.

This was resolved once I removed a squad from a raid(Raze) mission. One squad had already left and was waiting for the second. Several dwarfs from the second squad had left but 3 remained stuck in a tree. When I removed the squad from the mission (with the 3 tree huggers) FPS returned to normal.
TagsNo tags attached.

Relationships

duplicate of 0010538 assigneduser8971 Military with a raid mission stuck on tree destroy fps 

Activities

lethosor

2019-04-25 13:10

manager   ~0039348

What evidence do you have that this is a memory leak as opposed to ordinary lag?

slucerne

2019-09-04 03:46

reporter   ~0039505

Last edited: 2019-09-04 03:55

FPS remained at 5-10 for at least 20 real life minutes, the entire duration that the stuck dwarf, assigned to a mission, was stuck. The exact moment I relieved him from the squad, my fps returned to it's usual 200 and the mission progressed with the other dwarves already off the screen edge.

It wasn't just "meh, it feels a bit better now" it was basically unplayable, and I spent 20 minutes letting the game run, trying numerous things, changing traffic costs, sealing caverns, burrowing dwarves, the lot. Then when I found the stuck dwarf, unassigned him from the squad so the rest of his squad could start the mission (already being off the screen) the frame rate was restored drastically. The difference being dwarves moving one tile every 10 seconds, to moving faster than I can keep track of.

This has happened again since, in the past few months perhaps 2-3 times, but remembered the issue and resolved it quite quickly, same steps.


EDIT: Perhaps 'Memory leak' could be interpreted differently to other programmers. In my field of work we generally refer to anything that is running an unnecessary process as a 'memory leak', generally burning up your CPU without a good reason.

PatrikLundell

2019-09-05 01:20

reporter   ~0039506

The term "Memory leak" refers to memory being allocated and never released even though it isn't used any longer (and it is standard practice in e.g. Java, where garbage collection is intended to recover memory that is no longer used, to free the scripter from having to manage memory usage). This causes the program to crash when all physical and virtual memory has been allocated and the program tries to allocate more memory.

Lag is caused by processing that burn CPU cycles, disk swapping, and other things that cause the program to progress slowly. It is known there are several issues with pathing causing lag when the game constantly tries to generate new paths as it rejects the current one, only to reject the new one immediately.

Loci

2019-09-05 17:43

viewer   ~0039507

General mission/tree lag is 0010538.

Issue History

Date Modified Username Field Change
2019-04-25 07:30 slucerne New Issue
2019-04-25 13:10 lethosor Note Added: 0039348
2019-05-05 18:10 Loci Assigned To => Loci
2019-05-05 18:10 Loci Status new => feedback
2019-09-04 03:46 slucerne Note Added: 0039505
2019-09-04 03:46 slucerne Status feedback => assigned
2019-09-04 03:55 slucerne Note Edited: 0039505
2019-09-05 01:20 PatrikLundell Note Added: 0039506
2019-09-05 17:43 Loci Note Added: 0039507
2019-09-05 17:43 Loci Relationship added duplicate of 0010538
2019-09-05 17:43 Loci Status assigned => resolved
2019-09-05 17:43 Loci Resolution open => duplicate