Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0009905Dwarf FortressDwarf Mode -- Interface, Managerpublic2016-07-10 02:272018-04-25 01:17
ReporterMaXMC 
Assigned Tolethosor 
PrioritynormalSeveritycrashReproducibilityrandom
StatusconfirmedResolutionopen 
PlatformWindowsOSWindows 10OS Version10
Product Version0.43.05 
Target VersionFixed in Version 
Summary0009905: Filtering in work order product lists crashes the game and/or displays incorrect materials (usually with larger worlds)
DescriptionGame creates when trying to filter on wood in the Materials conditions filter
Steps To Reproduce1. Create workorder for 300 Wooden bolts
2. C for conditions
3. P for product conditions
4. M for change material
5. Type WOO
6. Game crashes on WO.

Additional InformationRunning the "Iron man" graphics release of 43.05 if that matters.

errorlog.txt produces only the text:
"removed erroneous unit occupancy flag
removed erroneous unit occupancy flag
removed erroneous unit occupancy flag
"
Tagsbinary patch, manager, Probable Quick Fix
Attached Files

- Relationships
has duplicate 0009954resolvedlethosor Filtering item type material on work order crashes 
has duplicate 0010175resolvedlethosor Memory corruption crash when searching materials 
has duplicate 0010145resolvedlethosor Crash to desktop when searching for rock nuts in manager item conditions 
has duplicate 0010155resolvedLoci segfault on searching for "pig tail" material in workshop profile work order 

-  Notes
(0035602)
smw23usedwrongemailthefirsttime (reporter)
2016-07-11 13:21

This doesn't crash for me, but I am using windows 7 and am not using a tileset. Does the crash still happen for you without a tileset?
(0035609)
MaXMC (reporter)
2016-07-12 13:30

Nope, I can't reproduce it in vanilla DF...
(0035840)
Hexa (reporter)
2016-09-03 04:25
edited on: 2016-09-03 04:26

I just encountered this in vanilla DF, perfectly reproducible.

Windows 10 x64, DF 43.05 x64. I want to filter the material condition for plump helmet spawn, then the game crashes at "PL".

if it helps in any way, the MSVC debugger says this:
Unhandled exception at 0x00007FFBC1EE5A4E (ucrtbase.dll) in Dwarf Fortress.exe: Fatal program exit requested.

the game wasn't modified save for a few init settings and disabling aquifers.

edit: fixed typo

(0036140)
lethosor (manager)
2017-01-09 09:34

Acknowledging this along with 0009954, although I haven't been able to reproduce it.
(0036380)
lethosor (manager)
2017-03-27 17:32

BenLubar posted a save at 0010175: http://dffd.bay12games.com/file.php?id=12792 [^]
(0036382)
lethosor (manager)
2017-03-27 19:59
edited on: 2017-08-15 09:15

I was able to reproduce the issue with BenLubar's save, and mifki helped identify the issue. Basically, in the "viewscreen_workquota_conditionst" screen (j-m-c), there are two vectors - one with a bunch of string pointers (which DFHack calls "list_entries"), and one with indices of elements in list_entries that match the current search (which DFHack has no name for, so it's called "anon_9" in DFHack 0.43.05-beta1). The problem is that the latter vector contains signed 16-bit integers, so all entries past 32767 (if they exist) are displayed as "unknown material", despite list_entries containing valid material names there. I assume that the crash occurs when DF tries to use *list_entries[i] somewhere, where -32768 <= i <= -1.

The simplest fix is probably to change this vector to store 32-bit integers. I'd be wary of just switching to unsigned 16-bit integers, since BenLubar's save above has 40k+ materials in the list, so it's possible that larger saves could have more than 2^16. (In that case, I'd just expect the list to start over at the first item after item 65535, which probably wouldn't crash, but it would still be a bug.)

(0036621)
ctgarlington (reporter)
2017-06-18 09:31

@lethosor

Out of curiosity, is this something that's a relatively simple edit somewhere (the changing from 16-bit integers to 32-bit for the indices)? Or is it likely to break functionality, unless other parts of the code are edited as well (and thus requires a larger overall patch)?
(0036697)
lethosor (manager)
2017-08-15 08:59

It should be a very simple patch - changing vector<int16_t> to vector<int32_t> in one location (although there could be other fields in this viewscreen with similar issues - it's been a long time since I looked at it).
(0038202)
Kulze (reporter)
2018-04-25 01:17

I can confirm this happening in 44.09 still, created a large world, searched for Granite, at typing the 'N' it crashed. Each save created at a medium world in the meantime seems to run just fine.
At the moment this makes managers in large worlds unable to be used for any sort of complex task.

- Issue History
Date Modified Username Field Change
2016-07-10 02:27 MaXMC New Issue
2016-07-11 13:21 smw23usedwrongemailthefirsttime Note Added: 0035602
2016-07-12 13:30 MaXMC Note Added: 0035609
2016-09-03 04:25 Hexa Note Added: 0035840
2016-09-03 04:26 Hexa Note Edited: 0035840 View Revisions
2016-09-03 05:56 Loci Relationship added related to 0009954
2016-11-25 11:21 lethosor Reproducibility always => random
2016-11-25 11:27 lethosor Summary Selecting Material and filtering Wood crashes the game => Filtering on "Wood" in work order product condition material list crashes the game
2017-01-09 09:34 lethosor Note Added: 0036140
2017-01-09 09:34 lethosor Assigned To => lethosor
2017-01-09 09:34 lethosor Status new => acknowledged
2017-01-09 09:34 lethosor Summary Filtering on "Wood" in work order product condition material list crashes the game => Filtering on "Wood" in work order product condition material list crashes the game (possibly tileset-specific)
2017-02-27 11:58 lethosor Issue Monitored: lethosor
2017-03-27 17:31 lethosor Relationship added has duplicate 0010175
2017-03-27 17:31 lethosor Issue Monitored: BenLubar
2017-03-27 17:32 lethosor Note Added: 0036380
2017-03-27 19:35 lethosor Relationship replaced has duplicate 0009954
2017-03-27 19:35 lethosor Issue Monitored: MalevolentGM
2017-03-27 19:36 lethosor Status acknowledged => confirmed
2017-03-27 19:59 lethosor Note Added: 0036382
2017-03-27 20:00 lethosor Tag Attached: Probable Quick Fix
2017-03-27 20:00 lethosor Relationship added has duplicate 0010145
2017-03-27 20:00 lethosor Relationship added has duplicate 0010155
2017-03-28 06:53 lethosor Summary Filtering on "Wood" in work order product condition material list crashes the game (possibly tileset-specific) => Filtering in work order product lists crashes the game and/or displays incorrect materials
2017-03-28 06:54 lethosor Summary Filtering in work order product lists crashes the game and/or displays incorrect materials => Filtering in work order product lists crashes the game and/or displays incorrect materials (usually with larger worlds)
2017-06-08 19:08 Huntthetroll Issue Monitored: Huntthetroll
2017-06-18 09:31 ctgarlington Note Added: 0036621
2017-06-18 10:19 ctgarlington Issue Monitored: ctgarlington
2017-08-15 08:59 lethosor Note Added: 0036697
2017-08-15 08:59 lethosor Tag Attached: binary patch
2017-08-15 09:15 lethosor Note Edited: 0036382 View Revisions
2018-01-09 20:08 lethosor Tag Attached: manager
2018-01-09 20:10 lethosor Category Dwarf Mode -- Interface, Workshop Profiles => Dwarf Mode -- Interface, Manager
2018-04-25 01:17 Kulze Note Added: 0038202


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker