View Issue Details

IDProjectCategoryView StatusLast Update
0012581Dwarf FortressDwarf Mode -- Interface, Workshop Profilespublic2025-01-18 17:25
Reporteremail Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status newResolutionopen 
Summary0012581: Workshop-specific work order disappear from work order tab of the workshop
DescriptionHello,

Sometimes, work orders specific to a workshop "disappear" from the work
order tab of the workshop - they still exist and remain visible from
the global work order list.
It happened when I played with the order of orders in the global list.
Here are the steps I did to reproduce:
- start a new fort
- add a couple of work orders specific to a workshop
- add a global work order (not related to the workshop, can be
something else)
- change the order of orders in the global list
- one of the workshop work orders is not displayed anymore in the work
orders tab of the workshop.

DF version: 50.11 but I remember having the issue in 50.10, at least.
OS: Windows.
No mods.

Please find attached a video example for this bug (not done by me, so I
am not the only one with this issue).

Deep regards,
Logem Cilobdural
TagsNo tags attached.

Activities

email

2023-10-12 00:07

reporter  

myk002

2025-01-18 17:25

reporter   ~0042496

I just did a bit of research about why workshop-bound work orders don't always show in the workshop interface, and I have a theory (which is fairly well confirmed by testing with a list of orders with known IDs):

1. when you click on a workshop and navigate to the Work orders tab, the game (correctly) does a linear search through world.manager_orders.all and populates the view_sheets_interfacest::work_order_id vector with the IDs of the orders that are bound to that workshop.

2. then, and this is where the incorrect behavior is, the rendering logic iterates through the work_order_id vector and does a **binary search** through world.manager_orders.all to find the order so it can render the information about it

since the manager_orders.all vector is not sorted, it is random whether you get a useful rendering of information

I suspect this bug made it into production because the logic works fine as long as the work orders are never reordered.

Add Note

Note

Issue History

Date Modified Username Field Change
2023-10-12 00:07 email New Issue
2023-10-12 00:07 email File Added: 264292154-0213e794-6261-4afc-84c7-7c8c21fff395.mp4
2023-11-23 03:45 nuvu Description Updated
2023-11-23 03:45 nuvu Project Triage => Dwarf Fortress
2023-11-23 03:48 nuvu Category General => Dwarf Mode -- Interface, Workshop Profiles
2025-01-18 17:25 myk002 Note Added: 0042496