-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Game freeze when telling NPC to construct woodchip floor in basecamp #41220
Comments
I can reproduce on experimental - it's not quite a complete freeze, but when the NPC starts to move woodchips, it gets quite slow, and freezes a bit. |
Can somebody please recheck this issue in latest experimental? I'm noticing a tiny bit of lag every 5-10 in-game minutes, but not even close to the scale described in the issue. The lag comes from |
loading this in a recent (as of a couple days ago) debug build, my experience is that during the process of relocating the splintered wood for the construction task, performance plummets viciously. turns which were going by pretty close to instantly previously (again, actual debug build, not merely with debug symbols) were taking up to three seconds, and it was taking sometimes multiple turns to move each individual splintered wood. once all the splintered wood was moved and the npc moved on to a different task, things resumed being swiftly responsive. the impact here is substantial, and i don't experience the same degree of slowdown having the same NPC in the same save moving items around from sorting loot. i think there's definitely an issue in the collecting-stuff-for-construction task. |
a key factor to the reproduction process here that needs to be noted is: starting a construction for the woodchip floor requires digging a pit first, which the system helpfully automatically handles before moving on to the floor construction. the problematic behavior will not be exhibited until after a pit is made, and the NPC decides to collect the materials to actually construct the floor. |
Ok, so I did a bit of debugging, and there are two problems here. First, there is an actual freeze (infinite loop) that is caused by Cataclysm-DDA/src/activity_item_handling.cpp Lines 2739 to 2749 in 7cc4088
It's trivial to fix, I'll submit PR soon. And there is a second issue, the NPC construction AI performance. The issue lies in I'm evaluating some ideas on how to address this. |
Describe the bug
I ordered my NPC to build a woodchip floor, then the game stalled and froze. No errors, no crashed, just eternal lag. I had some performance issues around my basecamp for some time prior to this due to sheer amounts of loot, but nothing too serious.
Steps To Reproduce
2.1 Open Zone manager (Y)
2.2 Add new zone (A)
2.3 Choose "Construction: Blueprint" (4)
2.4 Choose"Make Woodchip Floor" (never mind that requirements are red)
2.5 Designate a one tile zone on the snow near the player, save changes
2.6 Talk to NPC standing next to the player (Leila 'Charm' Weir, prisoner)
2.7 Talk about current activity (i), then do construction work (d)
Expected behavior
Game is not freezing and NPC works on woodchip floor if able.
Versions and configuration
Dark Days Ahead [dda],
No Rail Stations [No_Rail_Stations],
Graphical Overmap [Graphical_Overmap]
]
The text was updated successfully, but these errors were encountered: