Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0000378Dwarf FortressDwarf Mode -- Interface, Military Screenpublic2010-04-04 03:372010-06-14 14:11
Jiri Petru 
Toady One 
normalcrashalways
resolvedfixed 
0.31.01 
0.31.07 
0000378: Crash when selecting specific squad in military screen (daggers)
I have created a squad that can't be selected in the military screen, positions tab. When I try it, the game crashes.

The game ran well until I created a second squad. Even while creating the squad, it was OK. But once I quit the screen and re-entered I can no more select the squad.

I'm guessing this has something to do with the dwarves or position holders I put in the squad. The squad has only two members and I suspect one of them has to be the cause.
1) Download the save here: http://dffd.wimbli.com/file.php?id=1978 [^]
2) Enter military screen
3) In the positions tab, try to select the second squad
By the way, I guess there's no way how to remove members from the squad without using the military screen? No way how to unbug my save...
crash, Equipment, large dagger, military screen
parent of 0001063resolved Toady One Pressing 'm' to bring up military screen freezes game 
parent of 0001228resolved Toady One Crashes when I try to go 'm' menu 
parent of 0001364resolved Toady One Crash when opening military menu. 
parent of 0001222resolved Toady One Reproduceable Military Screen Crash (with savegame) 
parent of 0001442resolved Toady One Trading for tame humanoid causes crash when opening military screen 
parent of 0001748resolved Toady One Accessing military screen crashes game, unpausing crashes game, one-step crashes game, 
parent of 0000444resolved Toady One Crash when attempting to enter military screen 
has duplicate 0001874closed Logical2u Militay screen crash 
has duplicate 0002275resolved Footkerchief Crash when highlighting squad in military screen 
has duplicate 0002359resolved Footkerchief Crash in military screen caused by killed squad 
has duplicate 0001647resolved Footkerchief Attempting to open Military Screen Causes Crash 
related to 0000536resolved Toady One Crash after unpausing - militia commander's squad info doesn't point back at squad 
Issue History
2010-04-04 03:37Jiri PetruNew Issue
2010-04-04 06:39PolySoupNote Added: 0000855
2010-04-06 03:10RACCNote Added: 0001393
2010-04-06 09:13Rafal99Note Added: 0001475
2010-04-06 09:51Rafal99Issue Monitored: Rafal99
2010-04-06 21:29Lightning4Note Added: 0001667
2010-04-07 06:20Jiri PetruNote Added: 0001731
2010-04-07 06:20Jiri PetruNote Edited: 0001731bug_revision_view_page.php?bugnote_id=0001731#r518
2010-04-07 06:30Jiri PetruNote Edited: 0001731bug_revision_view_page.php?bugnote_id=0001731#r519
2010-04-07 06:32Jiri PetruNote Edited: 0001731bug_revision_view_page.php?bugnote_id=0001731#r520
2010-04-07 07:48Jiri PetruNote Added: 0001742
2010-04-07 08:00Rafal99Tag Attached: military screen
2010-04-07 08:00Rafal99Tag Attached: crash
2010-04-07 08:01Jiri PetruTag Attached: Equipment
2010-04-07 08:19Rafal99Note Added: 0001745
2010-04-07 08:39Rafal99Note Added: 0001748
2010-04-07 08:40Rafal99Tag Attached: large dagger
2010-04-07 08:41Rafal99Note Edited: 0001748bug_revision_view_page.php?bugnote_id=0001748#r523
2010-04-07 09:02Rafal99Note Added: 0001754
2010-04-07 09:07SirPenguinNote Added: 0001755
2010-04-07 09:20Jiri PetruNote Added: 0001756
2010-04-07 09:23DoctorZuberNote Added: 0001757
2010-04-07 09:29Rafal99Note Added: 0001759
2010-04-07 10:01Rafal99Note Added: 0001770
2010-04-07 10:33freezeNote Added: 0001785
2010-04-07 12:26DoctorZuberNote Added: 0001824
2010-04-10 10:03Jiri PetruNote Added: 0002596
2010-04-10 14:52Rafal99Note Added: 0002652
2010-04-10 15:09Jiri PetruNote Added: 0002654
2010-04-10 21:40RACCIssue Monitored: RACC
2010-04-12 20:23RichardCoreyNote Added: 0003190
2010-04-16 08:48FootkerchiefRelationship addedparent of 0001063
2010-04-16 08:48FootkerchiefRelationship addedparent of 0001228
2010-04-16 14:03warmistIssue Monitored: warmist
2010-04-18 15:24RACCIssue End Monitor: RACC
2010-04-20 09:42FootkerchiefRelationship addedparent of 0001364
2010-04-29 17:37FootkerchiefRelationship addedparent of 0001222
2010-04-29 17:37FootkerchiefRelationship addedparent of 0001647
2010-04-29 17:38FootkerchiefRelationship addedparent of 0001644
2010-04-29 17:51FootkerchiefRelationship addedparent of 0001442
2010-05-01 05:19Logical2uRelationship addedrelated to 0000536
2010-05-04 16:30EtchNote Added: 0006124
2010-05-04 23:48FootkerchiefRelationship addedparent of 0001748
2010-05-14 16:07Jiri PetruNote Added: 0006701
2010-05-16 06:23Logical2uRelationship addedhas duplicate 0001874
2010-05-27 08:24DarthCloakedDwarfNote Added: 0007382
2010-06-11 05:27FootkerchiefRelationship addedhas duplicate 0002275
2010-06-11 05:28FootkerchiefNote Added: 0008131
2010-06-12 12:56FootkerchiefSummaryCrash whenever I try to select a specific squad => Crash when selecting specific squad in military screen
2010-06-12 12:56FootkerchiefSticky IssueNo => Yes
2010-06-13 01:10Toady OneNote Added: 0008251
2010-06-13 01:10Toady OneAssigned To => Toady One
2010-06-13 01:10Toady OneStatusnew => acknowledged
2010-06-13 01:36Toady OneRelationship replacedrelated to 0001647
2010-06-13 01:37Toady OneRelationship replacedrelated to 0001644
2010-06-13 02:05Toady OneStatusacknowledged => resolved
2010-06-13 02:05Toady OneFixed in Version => 0.31.07
2010-06-13 02:05Toady OneResolutionopen => fixed
2010-06-13 02:08FootkerchiefSummaryCrash when selecting specific squad in military screen => Crash when selecting specific squad in military screen (daggers)
2010-06-13 02:10FootkerchiefRelationship addedparent of 0000444
2010-06-13 04:37Rafal99Issue End Monitor: Rafal99
2010-06-13 10:11FootkerchiefRelationship deletedrelated to 0001644
2010-06-13 10:11FootkerchiefRelationship deletedrelated to 0001647
2010-06-13 12:51FootkerchiefSticky IssueYes => No
2010-06-14 14:11warmistIssue End Monitor: warmist
2010-06-17 05:16FootkerchiefRelationship addedhas duplicate 0002359
2012-03-30 19:59FootkerchiefRelationship addedhas duplicate 0001647
2012-03-30 19:59FootkerchiefIssue Monitored: Footkerchief

Notes
(0000855)
PolySoup   
2010-04-04 06:39   
I've had the same thing happen to me, and have uploaded my save here: http://dffd.wimbli.com/file.php?id=1981 [^]

My first squad was all melee and the second were all ranged if that matters.
(0001393)
RACC   
2010-04-06 03:10   
I have a save that reproduce this as well:

http://dl.dropbox.com/u/155636/df_mil_screen_crash.7z [^]

Steps to Reproduce:
1. (m) go to military screen
2. press (down) a few times to highlight the last squad in the Positions tab
3. crash.
(0001475)
Rafal99   
2010-04-06 09:13   
I have exactly the same crash. It crashes every time when you press (m) then (down) to select the next squad.
It crashes only in "Positions" tab. I tried avoiding this bug by going to "Equip" tab, then selecting the next squad, then going back to "Positions" tab, and in that case it crashed when I was going back to "Positions" tab with the second squad selected.
I may find a save if these above are not enough.
(0001667)
Lightning4   
2010-04-06 21:29   
I have a save now where this is reproducible as well. It was working fine for a while, but I noticed it consistently crashed after a while, while trying to form a military. In my case, it crashes trying to go to the first squad, as the first slot is taken by the captain of the guard.
(0001731)
Jiri Petru   
2010-04-07 06:20   
(edited on: 2010-04-07 06:32)
Did more testing. Seems like the game crashes when I have more that 5 dwarves in a squad. Could someone try to confirm this?

EDIT: Nope, that's not it. Tried creating several squads with no more than 4 dwarves. Crashed nonetheless. Right now I'm trying to find the reason because it's making my game unplayable.

EDIT2: Whoever decides to test this: please note you have to make changes to the squad, then unpause the game and let it run for a few seconds before it notices the change.

(0001742)
Jiri Petru   
2010-04-07 07:48   
!!!FOUND IT!!!

This problem is caused by equipping items, in my case a Large Bismuth Bronze Dagger left by a kobold thief. Whenever someone tried to equip that, it would cause a crash upon opening his squad in Military screen > Positions. After forbidding the dagger, I was able to draft my whole fort without trouble - before I could only get up to 10 dwarves, until thr 11th would claim the dagger (yeah, I don't have many weapons).

Download this save: http://dffd.wimbli.com/file.php?id=2019 [^]
Steps to reproduce:

1. Disband the whole military
2. In stocks menu, forbid all weapons except the large bismuth bronze dagger.
3. Draft the whole fort.
4. Unpause the game, let it run for a few second, go back to the military screen, try to select each of the squads, watch it crash.

Then try this:
1. Disband the whole military
2. In stocks menu, forbid the large bismuth bronze dagger.
3. Draft the whole fort.
4. Unpause the game, let it run for a few second, go back to the military screen, try to select each of the squads, watch it work perfectly.


Could someone who has the same problem in their game prove/disprove my theory?
(0001745)
Rafal99   
2010-04-07 08:19   
I tried dumping the two large daggers I have, one of which I equipped by a dwarf in my second squad - the one which crashes.
Waited for the daggers to be dumped, but it still crashes when I try to select the second squad in "Positions" tab.

But I have discovered another thing. When I go to military screen then "Equip" tab and deselect all items from all members of the second squad then wait a while, crash in "Positions" tab stops happening.

So it seems that not only daggers but some other item causes it too, gonna track it down.
(0001748)
Rafal99   
2010-04-07 08:39   
(edited on: 2010-04-07 08:41)
Well large daggers it is.

It didn't crash if I went to "Equip" tab and deselected only the dagger-wielding dwarf's weapon. He was assigned "Individual choice - melee", I can reassign him back and no crash, even if he still wields the dagger.

Only dumping the dagger without other changes didn't work for me. It was still crashing. It might be related to the fact that the dagger wielding dwarf is resting and is unconscious, so he has no chance to notice lack of his dagger and find a new weapon.

So yeah, solution seems to be to dump all large daggers and either wait for the dwarves to find another weapon or if your military screen doesn't crash in the first squad, go to 'Equip' tab, then remove and add again weapons to dagger-wielding dwarves.

(0001754)
Rafal99   
2010-04-07 09:02   
Changing [SKILL:DAGGER] to [SKILL:SWORD] in large dagger raw entry fixes this too.
I think the crash heppens when the game displays type of soldiers in the specific squad in "Positions" tab. It displays something like "2/2 Sworddwarves 4/4 Wrestlers" etc. Dwarves probably lack a name for knife user, gonna search the raws for proper fix.
(0001755)
SirPenguin   
2010-04-07 09:07   
Good detective work, guys. I bet that's exactly what it is. Hopefully this saves Toady a lot of work.
(0001756)
Jiri Petru   
2010-04-07 09:20   
High five! :D
(0001757)
DoctorZuber   
2010-04-07 09:23   
Nice work, from the title that one looked tricky to find, and here you guys seem to have it all sorted out already. Good Job!
(0001759)
Rafal99   
2010-04-07 09:29   
Ok the skill change is the only fix I found.
Adding [PROFESSION_NAME:THIEF:knifedwarf:knifedwarves] to dwarf raw entry didn't fix it, so lack of knife user name isn't the direct cause of this bug.

Someone should test if other weapons requiring strange skills like for example Whip and Scourge cause this crash too.

I am going to post in the forums about the fix.
(0001770)
Rafal99   
2010-04-07 10:01   
Here is the forum thread:
http://www.bay12games.com/forum/index.php?topic=53371.0 [^]

Hope it helps some people.
(0001785)
freeze   
2010-04-07 10:33   
Excellent.. change [SKILL:DAGGER] to [SKILL:SWORD] worked on my "press m instacrash" game
(0001824)
DoctorZuber   
2010-04-07 12:26   
0000444 0000536

I wouldn't close 0000536 yet, but there seems to be a similar behavior going on here.
(0002596)
Jiri Petru   
2010-04-10 10:03   
Daggers still cause problems for me, but for some reason I can't fix it by rewriting them to [SKILL:SWORD]. Forbidding the dagger and waiting a while till the soldier dropped it helped, though.
(0002652)
Rafal99   
2010-04-10 14:52   
Are you replacing the correct raws?
The ones actually used are in your save folder.
(0002654)
Jiri Petru   
2010-04-10 15:09   
Yup, the save folder. It helped once, but then it started crashing again with SKILL:SWORD. But I guess this has to be a problem between my keyboard and the chair. For the time being, I forbid all daggers and wait for Toady to fix it :)
(0003190)
RichardCorey   
2010-04-12 20:23   
I am having the same crash with no daggers being involved so far as I can tell. We do have a dagger in a weapon trap, but it's not involved at all. My one squad is set to short swords, and the one I can't select is set to "your choice ranged", but they aren't active at all, nor have we retrieved any ranged weapons from invaders.

http://dffd.wimbli.com/file.php?id=2084 [^]
(0006124)
Etch   
2010-05-04 16:30   
I have a save which also crashed whenever I pressed m to access the military screen, and which was fixed by rewriting SKILL:DAGGER to SKILL:SWORD. Have yet to play further in that save to see if the fix is permanent or not.

However, looking through my millitary (2 squads, 13 dwarves), none of my dwarves are wielding any daggers, and in fact the only dagger of any kind is a large iron dagger, originating I believe from a goblin thief, sitting in a weapon stockpile in my barracks. Reverting the change in the raws and checking the only two dwarves who had any skill in sword use (dabbling & proficient) in the first squad post-fix showed that neither of them had any skill in dagger use pre-fix.
(0006701)
Jiri Petru   
2010-05-14 16:07   
I suggest renaming this thread to: "Large Daggers Cause Crash on Military Screen"
(0007382)
DarthCloakedDwarf   
2010-05-27 08:24   
Crash confirmed in 31.04. It's still there.
(0008131)
Footkerchief   
2010-06-11 05:28   
Save from 0002275: http://dl.dropbox.com/u/4436079/region1.7z [^]
(0008251)
Toady One   
2010-06-13 01:10   
I've fixed up the 0002275 save for 0.31.07 (daggers, indeed). I'll check through the others as possible and then mark off this family (if it is all this issue).