Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0000536Dwarf FortressDwarf Mode -- Jobs, Militarypublic2010-04-05 16:132010-06-15 09:09
neomaster321365 
Toady One 
normalcrashalways
resolvedfixed 
Windows 7
0.31.01 
0.31.07 
0000536: Crash after unpausing - militia commander's squad info doesn't point back at squad
The short version is I have a save where, assuming the save is loaded paused, you can move around the area and go up and down levels and go to the different menu screens like the military screen and the squad screen and exit them just fine, but if I just unpause and wait a few seconds, it crashes. Every single time. Tried it like seven times. I think it's curious that while going to the military and squad screens, seemingly very popular for crashes, isn't doing a thing, simply allowing the game to simulate five seconds does make it crash. I realized just now that we can't upload saves, so contact me by email if you want the save. Otherwise just ignore this, Toady. I can't fathom a guess why it's crashing. I just had an immigration wave, but every single one of them are already done blinking when the save is loaded. General dwarven activities are going on, and it just extremely reliably crashes five or so seconds after unpausing.
Contact me at collin.reeser@gmail.com for the save, load it, and unpause. Wait five seconds. Crash.
I didn't know we couldn't upload stuff, so contact me at collin.reeser@gmail.com to figure out a way to send you the save if you actually end up wanting it. I'm sure whatever is causing this crash is something not very obvious in my case, obvious in others, and will get fixed without you ever having to even consider taking a look at my save, but it's there for your request regardless. Have an excellent day and happy coding!
No tags attached.
related to 0000378resolved Toady One Crash when selecting specific squad in military screen (daggers) 
related to 0001644resolved Footkerchief Unassigning squad leader in nobles screen causes hard crash when entering military screen 
related to 0001647resolved Footkerchief Attempting to open Military Screen Causes Crash 
related to 0000319resolved Toady One Militia commander/captain positions are assignable on the nobles screen, but silently change back 
parent of 0000910resolved Toady One Reproducible crash with save, possibly caused by dwarf who can't be removed from military and gets a mood 
parent of 0000452resolved Toady One Training military dwarf causes crash - Includes Save Game 
parent of 0000204resolved Toady One Reproducible crash - military related 
parent of 0001593resolved Toady One Sleeping Militia Commander causes crash - SAVE INCLUDED 
parent of 0001784resolved Toady One Militia commander causes crash 
parent of 0001335resolved Toady One Military/squad related crash (with save) 
parent of 0000384resolved Toady One Militia commander causes crash 
parent of 0001419resolved Footkerchief Crash upon killing salt titan 
parent of 0000233resolved Toady One Crash with general "encountered problem" error involving military units. 
related to 0002298resolved Toady One crash after trying to access squad members from a non assigne squad 
related to 0001255resolved Toady One Crash, caused either by human siege or battling forgotten beast 
related to 0001421resolved Footkerchief Military related crash - barracks destruction also possible 
related to 0006452resolved Footkerchief Save crashes unless military is disbanded 
Issue History
2010-04-05 16:13neomaster321365New Issue
2010-04-05 16:22Logical2uNote Added: 0001257
2010-04-05 19:14neomaster321365Note Added: 0001296
2010-04-05 19:29neomaster321365Note Added: 0001302
2010-04-05 20:11Logical2uNote Added: 0001315
2010-04-07 00:29neomaster321365Note Added: 0001699
2010-04-07 10:17SirPenguinNote Added: 0001778
2010-04-07 10:19SirPenguinNote Added: 0001781
2010-04-07 10:23SirPenguinNote Edited: 0001781bug_revision_view_page.php?bugnote_id=0001781#r529
2010-04-07 10:26SirPenguinNote Edited: 0001781bug_revision_view_page.php?bugnote_id=0001781#r530
2010-04-07 10:38SirPenguinNote Edited: 0001781bug_revision_view_page.php?bugnote_id=0001781#r533
2010-04-07 10:47SirPenguinNote Edited: 0001781bug_revision_view_page.php?bugnote_id=0001781#r534
2010-04-07 11:00Logical2uNote Added: 0001798
2010-04-07 11:14SirPenguinNote Edited: 0001781bug_revision_view_page.php?bugnote_id=0001781#r537
2010-04-07 11:15SirPenguinNote Added: 0001805
2010-04-07 12:10neomaster321365Note Added: 0001818
2010-04-07 12:14SirPenguinNote Added: 0001820
2010-04-07 12:18DoctorZuberNote Added: 0001822
2010-04-07 12:23DoctorZuberNote Added: 0001823
2010-04-07 12:27neomaster321365Note Added: 0001825
2010-04-10 11:17FootkerchiefRelationship addedrelated to 0000910
2010-05-01 05:19Logical2uCategoryGeneral => Dwarf Mode -- Jobs, Military
2010-05-01 05:19Logical2uSummaryCrash after unpausing => Crash after unpausing - knife using military
2010-05-01 05:19Logical2uRelationship addedrelated to 0000378
2010-06-13 01:58Toady OneNote Added: 0008258
2010-06-13 01:58Toady OneAssigned To => Toady One
2010-06-13 01:58Toady OneStatusnew => acknowledged
2010-06-13 01:59Toady OneRelationship addedrelated to 0001644
2010-06-13 10:08FootkerchiefRelationship replacedparent of 0001644
2010-06-13 10:08FootkerchiefRelationship replacedparent of 0000910
2010-06-13 10:08FootkerchiefRelationship addedparent of 0001647
2010-06-13 10:08FootkerchiefRelationship addedparent of 0002298
2010-06-13 10:10FootkerchiefRelationship addedparent of 0000452
2010-06-13 10:10FootkerchiefSummaryCrash after unpausing - knife using military => Crash after unpausing - militia commander dissociated from squad
2010-06-13 10:44Logical2uRelationship addedrelated to 0000204
2010-06-13 12:44FootkerchiefRelationship addedparent of 0001593
2010-06-13 12:45FootkerchiefRelationship addedparent of 0001784
2010-06-13 12:46FootkerchiefRelationship addedparent of 0001335
2010-06-13 12:46FootkerchiefRelationship addedparent of 0000384
2010-06-13 12:48FootkerchiefRelationship addedparent of 0001419
2010-06-13 12:48FootkerchiefRelationship addedparent of 0000233
2010-06-13 12:49FootkerchiefRelationship addedparent of 0001255
2010-06-13 12:50FootkerchiefRelationship replacedparent of 0000204
2010-06-13 12:50FootkerchiefRelationship addedparent of 0001421
2010-06-13 12:50FootkerchiefSticky IssueNo => Yes
2010-06-13 12:54FootkerchiefNote Added: 0008310
2010-06-13 12:55FootkerchiefSummaryCrash after unpausing - militia commander dissociated from squad => Crash after unpausing - militia commander's squad info doesn't point back at squad
2010-06-13 12:56FootkerchiefRelationship addedrelated to 0000319
2010-06-13 12:57FootkerchiefNote Added: 0008311
2010-06-15 03:04Toady OneNote Added: 0008480
2010-06-15 03:26Toady OneRelationship replacedrelated to 0002298
2010-06-15 03:59Toady OneRelationship replacedrelated to 0001421
2010-06-15 04:24Toady OneRelationship replacedrelated to 0001255
2010-06-15 04:38Toady OneNote Added: 0008492
2010-06-15 06:24Toady OneRelationship replacedrelated to 0001647
2010-06-15 06:24Toady OneRelationship replacedrelated to 0001644
2010-06-15 06:25Toady OneNote Added: 0008499
2010-06-15 06:25Toady OneStatusacknowledged => resolved
2010-06-15 06:25Toady OneFixed in Version => 0.31.07
2010-06-15 06:25Toady OneResolutionopen => fixed
2010-06-15 09:09FootkerchiefSticky IssueYes => No
2014-03-04 07:24FootkerchiefRelationship addedrelated to 0006452

Notes
(0001257)
Logical2u   
2010-04-05 16:22   
Upload things here - http://dffd.wimbli.com/index.php [^]
Can you check the gamelog and see what sort of stuff shows up? I'm personally curious of it's related to 0000495.
How much RAM does your PC have?
(0001296)
neomaster321365   
2010-04-05 19:14   
My computer has 4GB of RAM. This fort has been going for a few hours so I don't think it has to do with any early-game errors like what happened in 0000495. In the gamelog, **Loading Fortress** is the very last entry. Nothing happens between loading the save, unpausing, and waiting five seconds for the crash. I'm waiting on my activation email for the DFFD, so I'll upload my save as soon as I can log in to upload.
(0001302)
neomaster321365   
2010-04-05 19:29   
The save is available for download at the following link: http://dffd.wimbli.com/file.php?id=2006 [^]

Thank you Logical2u for the link to the DFFD.
(0001315)
Logical2u   
2010-04-05 20:11   
Crash confirmed in Windows 7 x64.

By any chance is that what you're using as well?

The crash specifically occurs a few frames after the two carpenters cross paths near the trade depot.

I used reveal to try and see if there was some invisible event causing the crash but nothing jumped out at me.
(0001699)
neomaster321365   
2010-04-07 00:29   
I am indeed using Windows 7 x64. I'm just hoping that this is related to some other crash and it just isn't obvious in this case. Otherwise this will be a pretty tricky one to pin down.
(0001778)
SirPenguin   
2010-04-07 10:17   
Confirmed on Windows 7, x86, 2 gigs of RAM. The fact it doesn't happen immediately is cool. I think I'll play around with disabling certain things until I figure it out.
(0001781)
SirPenguin   
2010-04-07 10:19   
(edited on: 2010-04-07 11:14)
Alright, I fixed it. Disabling both squads did the trick. Crash is related to the military. Now to narrow it down. I'll edit in my findings to this comment.

1: Alright, it's the first squad, the Blockade Flags who are the troublemakers
2: Well this is interesting. Disabling the schedules for all the squads also stops it from crashing. However, the moment you hit "(m)ilitary" again, the game crashes every time. Tested it out 3 times
3: Canceling their orders via the "(s)quad" screens produces identical results as (2)
4: Giving them a different order (i.e., "Move") replicates crash from (2) as well
5: Removing every squad member but the commander still causes the initial crash
6: Removing equipment from every squad member still causes the initial crash
7: Deleting/Disbanding the squad removes the crash AND allows you to go back to the Military screen
8: Changing the squad leader (after kicking everyone else out) removes the crash AND allows you to go back to the Military screen
9: Observation: The squad leader that causes the crash is "Resting" with a broken foot
10: Removing the arsenal dwarf, removing all equipment from the dwarves, and telling the squad to be inactive removes both crashes as well
11: First conclusion: arsenal dwarf is attempting to assign equipment to a resting dwarf causing it to crash?
12: Removing just the arsenal dwarf is not enough. Still crashes.
13: Removing the arsenal dwarf AND the equipment of the commander still results in the crash
14: Removing the A. dwarf, removing equipment from commander, and telling the squad to be inactive fixes both crashes
15: Removing the A. dwarf and telling the squad to be inactive fixes both problems
16: TOTALLY DIFFERENT DIRECTION: removing a soldier who is currently "picking up equipment" and telling the squad to be inactive fixes both crashes
17: Simply removing the dwarf is not enough to stop the initial crash
18: Observation: Following the dwarf who is picking up the equipment shows he is repeatedly trying to pick up a giant spider hood despite already wearing a hood. Game crashes after the 3rd attempt to put the hat on
19: Turning the squad inactive and removing the A. dwarf AND waiting for the dwarf trying to pick up the equipment to "fix himself" fixes crashes


Final conclusion: something with the equipment is fucked up. His refusal to put it on is probably causing the initial crash, and when the initial crash is fixed the crash on the military screen is probably because the game expects him to be wearing the hat but isn't.

(0001798)
Logical2u   
2010-04-07 11:00   
You are a better and more patient man than I, SirPenguin.

Confirmed that disabling the Blockaded Flags stops the crash, at least temporarily.

Confirmed that setting all their statuses to "no orders" also stops the crash. But it didn't crash for me after hitting military again - the second time, though, it did.

The new crash is slightly different from the old one - it looks more like the crash from 0000629 then it did originally now, but removing the military doesn't stop 0000629 's crash.
(0001805)
SirPenguin   
2010-04-07 11:15   
Submitted my final conclusion and findings. Not much else I can do without being able to tinker with code.
(0001818)
neomaster321365   
2010-04-07 12:10   
Wow, SirPenguin. You just... You just painstakingly and methodically destroyed the mystery around that bug. My regards, and my thanks for "fixing" my save. Is there anything I need to do to alter this ticket or is it still a valid standalone report?
(0001820)
SirPenguin   
2010-04-07 12:14   
Haha, as a programmer I really enjoy bugtesting and Quality Assurance. I figured narrowing it down helps you and Toady.
(0001822)
DoctorZuber   
2010-04-07 12:18   
um... wow... That was some quality work SirPenguin. Good Job!
(0001823)
DoctorZuber   
2010-04-07 12:23   
"2: Well this is interesting. Disabling the schedules for all the squads also stops it from crashing. However, the moment you hit "(m)ilitary" again, the game crashes every time. Tested it out 3 times"

This may be a HUGE clue as to what is going on in another bug report. Let me track that down real quick.

refer to 0000378 and 0000444
(0001825)
neomaster321365   
2010-04-07 12:27   
Well SirPenguin, I too am a programmer, albeit as a student and as a hobby. I just much prefer actually having code to look at when I'm hunting for bugs. :P
(0008258)
Toady One   
2010-06-13 01:58   
Somehow the militia commander's squad information got changed so that it no longer points back to the squad, and this messed it up all sorts of ways. It loads in that state, so I'm not sure what caused it. Possibly related to 0001644.
(0008310)
Footkerchief   
2010-06-13 12:54   
Reminder sent to: Toady One

Hey Toady -- there were apparently a lot of crashes that could be solved by removing the militia commander, so I've brought (hopefully) all those reports together under this one. I'm not sure any of them will be useful for figuring out how the squad info got corrupted, though.
(0008311)
Footkerchief   
2010-06-13 12:57   
Reminder sent to: Toady One

I also added a relationship to 0000319, which seems potentially able to cause problems like this.
(0008480)
Toady One   
2010-06-15 03:04   
The bad interplay between 'n' and 'm' is definitely suspect, but I couldn't get it to reproduce the squad info disconnect precisely. I'm going to continue working through those errors, and if the error logs related to broken squad info clear up, we can call it good. The crashes should be patched up in either case.
(0008492)
Toady One   
2010-06-15 04:38   
I can get the squad info disconnect if I have a guy in two militia leadership positions with squads created (captain twice or commander/captain) and then remove the dwarf from the second squad. It is a bug (like 0000266) to have a dwarf leading two squads at once -- if you ever had a dwarf leading two squads at once (even as a temporary accident on the mil screen without going back to the main mode), it could create this crash. Does that sound familiar to anybody? Or have squad disconnect crashes happened in situations with only one squad?
(0008499)
Toady One   
2010-06-15 06:25   
Hopefully that'll be it. It's all I can find, and it is fixed up now for 0.31.07. Feel free to reopen this if we continue to have disconnects in new forts (there will be a log message for the repair on old forts).