View Issue Details

IDProjectCategoryView StatusLast Update
0006197Dwarf FortressTechnical -- Generalpublic2012-09-17 13:31
ReporterTelarin Assigned Touser6 
PrioritynormalSeverityblockReproducibilityalways
Status resolvedResolutionno change required 
Product Version0.34.11 
Summary0006197: Crash in Fortress Mode
DescriptionCrash to desktop a few seconds after unpausing.
Steps To ReproduceLoad provided save, unpause, wait a few seconds.
Tagscrash, Fortress Mode

Activities

Telarin

2012-09-13 06:22

reporter   ~0023571

Last edited: 2012-09-13 06:24

Save link http://dffd.wimbli.com/file.php?id=6911
No mods, but I do use DFHack and Quietust's binary patch to prevent military training rage.

Telarin

2012-09-13 06:23

reporter   ~0023572

Also in this save, I have not received migrants for many years (no message regarding them either) nor have I had any new births in a similar amount of time. I would open another issue for that, however, since the save crashes after a few seconds, I think it would not be very useful for troubleshooting.

ag

2012-09-13 13:10

reporter   ~0023573

Last edited: 2012-09-13 13:33

Tried the save. The crash is in the squad code related to schedules. I notice that one of your squads (the one with an unfilled position) has corrupted correspondence between positions really occupied by units, and the ones they think they occupy; specifically, the commander thinks he is in position 5 instead of 0; position 8 thinks he is 7, and 9 thinks he is 8. Did you by any chance use any hacks to assign units to positions, e.g. maybe Dwarf Therapist?

As to migrants, having about 3000 units on your map (dead or not) stops them completely. You have 6000+. The fix/dead-units script from dfhack cleans out uninteresting dead units from the unit list, and it was reported that it helps with migrants too. Disclaimer: use at your own risk, etc.

Edit: And sure enough, fixing those position links enabled it to run at least for 1.5 in-game month without any problems.

ag

2012-09-14 01:19

reporter   ~0023575

Since you are using dfhack, here is a tested script to fix the corruption:

for _,squad in ipairs(df.global.world.squads.all) do
  for pos_idx,pos in ipairs(squad.positions) do
    local hfig = df.historical_figure.find(pos.occupant)
    if hfig then
      local unit = df.unit.find(hfig.unit_id)
      if unit then
        unit.military.squad_position = pos_idx
      end
    end
  end
end

Telarin

2012-09-17 12:41

reporter   ~0023585

Yep, I did use Dwarf Therapist to assign dwarves to squads. Good to know that is a little buggy, and thank you for the script, I'll give it a try. I guess this can be closed out as it is not a problem with DF itself.

user6

2012-09-17 13:31

  ~0023586

Thanks to you both for investigating and reporting back.

Issue History

Date Modified Username Field Change
2012-09-13 06:17 Telarin New Issue
2012-09-13 06:19 Telarin Tag Attached: crash
2012-09-13 06:20 Telarin Tag Attached: Fortress Mode
2012-09-13 06:22 Telarin Note Added: 0023571
2012-09-13 06:23 Telarin Note Added: 0023572
2012-09-13 06:24 Telarin Note Edited: 0023571
2012-09-13 13:10 ag Note Added: 0023573
2012-09-13 13:33 ag Note Edited: 0023573
2012-09-14 01:19 ag Note Added: 0023575
2012-09-17 12:41 Telarin Note Added: 0023585
2012-09-17 13:31 user6 Note Added: 0023586
2012-09-17 13:31 user6 Status new => resolved
2012-09-17 13:31 user6 Resolution open => no change required
2012-09-17 13:31 user6 Assigned To => user6