View Issue Details

IDProjectCategoryView StatusLast Update
0011944Dwarf FortressDwarf Mode -- Interface, Designationspublic2024-03-14 13:03
ReporterBD_Le_Dragon_Noir Assigned ToToady One  
PriorityhighSeveritycrashReproducibilityhave not tried
Status assignedResolutionopen 
Product Version50.03 
Summary0011944: Crash after removed assigned office zone
DescriptionOn my current fort, if I remove any of the office zones assigned to a dwarf, the game will crash shortly after. If I unassign the office first, it doesn't crash after removal.
https://drive.google.com/file/d/17Uzher5I174yMU6bZw0G95UfBKqCZu13/view?usp=sharing
Tagsfloor, office, Zones

Activities

BD_Le_Dragon_Noir

2022-12-19 20:05

manager   ~0041365

Last edited: 2022-12-23 16:49

https://discord.com/channels/329272032778780672/1054447061984104618
closed&locked in Discord

related
https://discord.com/channels/329272032778780672/1050738443640131656
https://discord.com/channels/329272032778780672/1051593472936792104
https://discord.com/channels/329272032778780672/1055735312283873310

anonymous

2023-01-04 22:15

viewer   ~0041621

I can also reliably reproduce this on one of my saves, but with bedrooms

anonymous

2023-01-06 06:49

viewer   ~0041636

Last edited: 2023-01-06 06:50

View 2 revisions

I am also able to reliably reproduce this on one of my saves. After accidentally assigning two offices to the same dwarf, attempting to remove the second one results in a crash. Resizing and moving the zone helped as a temporary solution, but any time I attempt to remove that specific zone the game crashes. This may also happen with burrows but I haven't been able to confirm. Definitely happens with other zones though.

anonymous

2023-01-06 07:29

viewer   ~0041637

I have been looking into this bug (on 50.04 and 50.05) and have notice a couple thing that might help track the bug down.

The first thing I've noticed is that if I delete a zone assigned to a dwarf the game will still report the dwarf as having that zone in the menu where you assign dwarves to zone (e.g. if I delete my king's royal bedroom the UI for assigning dwarves to bedrooms will continue saying that the king has a royal bedroom). This behaviour however does not persist if I start the game in a debugger, which makes be very suspicious that wherever that ui is getting its information from is holding onto a pointer to freed memory.

The second thing I've noticed is that, on my system, starting the game in a debugger, deleting a zone assigned to a dwarf, and then opening the unit summary for the dwarf who's zone I deleted very consistently crashes the game. I have reproduced this crash outside a debugging context, but it seems much more rare without the windows debug heap behaviour (or other debug behaviour the game has that I'm not aware of)

anonymous

2023-01-08 05:47

viewer   ~0041657

I managed to reproduce this with a fresh world and fresh embark:

1) Create a office zone, doesn't need to have any furniture
2) Assign the expedition leader to the zone
3) Remove the zone without freeing the room first
4) Open the nobles screen
5) The game crashes before the noble screen is displayed

I played around with it a little bit more, and it seems to crash with other rooms also, but only with nobles (not 100% sure). One time it crashed before opening the nobles screen, but the nobles screen has been the most reliable way to crash it.

anonymous

2023-02-02 16:14

viewer   ~0041753

I was fairly consistently seeing this (or perhaps a very similar) bug, with at least bedroom, office, and tomb zones.

I noticed that saving and reloading immediately after messing with the zone designations prevents the crash, so I believe the comment above about it being a memory issue is likely correct.

anonymous

2023-03-03 12:19

viewer   ~0041774

Have been able to encounter this bug myself.

My game crushes even after I delete designated zone and than save-reload (I have to mention that I play on Linux).

anonymous

2023-03-14 00:37

viewer   ~0041782

Came here to report this exact bug. My game kept crashing, and after a couple hours of wasted effort, I finally realized that it was happening right after I deleted my assigned Offices during a renovation.

anonymous

2023-06-22 08:43

viewer   ~0041806

I ran into this too. Here's a recent save that can reliably reproduce the issue with an assigned tomb zone: https://dffd.bay12games.com/file.php?id=16757

anonymous

2023-06-22 14:49

viewer   ~0041807

the issue here is that there is a vector in each unit record that contains pointers to the buildings that unit "owns". this vector is not updated when a building is deleted, resulting in a dangling pointer reference that, if later used, will be invalid and will thus cause undefined behavior. since this vector is not persisted in the save (it's ignored while saving and reconstructed from other data while loading), the savefile will not show anything amiss

lethosor

2023-09-01 07:49

manager   ~0041826

Fix targeted for the next version

myk002

2024-03-14 13:03

reporter   ~0042098

this is now fixed

Add Note

Note

Issue History

Date Modified Username Field Change
2022-12-19 20:05 BD_Le_Dragon_Noir New Issue
2022-12-19 20:05 BD_Le_Dragon_Noir Tag Attached: floor
2022-12-19 20:05 BD_Le_Dragon_Noir Tag Attached: office
2022-12-19 20:05 BD_Le_Dragon_Noir Tag Attached: Zones
2022-12-19 20:05 BD_Le_Dragon_Noir Note Added: 0041365
2022-12-21 11:57 BD_Le_Dragon_Noir Note Edited: 0041365
2022-12-22 18:19 BD_Le_Dragon_Noir Note Edited: 0041365
2022-12-23 16:49 BD_Le_Dragon_Noir Note Edited: 0041365
2023-01-04 22:15 anonymous Note Added: 0041621
2023-01-06 06:49 anonymous Note Added: 0041636
2023-01-06 06:50 anonymous Note Edited: 0041636 View Revisions
2023-01-06 07:29 anonymous Note Added: 0041637
2023-01-08 05:47 anonymous Note Added: 0041657
2023-02-02 16:14 anonymous Note Added: 0041753
2023-03-03 12:19 anonymous Note Added: 0041774
2023-03-14 00:37 anonymous Note Added: 0041782
2023-06-22 08:43 anonymous Note Added: 0041806
2023-06-22 14:49 anonymous Note Added: 0041807
2023-09-01 07:49 lethosor Note Added: 0041826
2023-09-01 07:49 lethosor Assigned To => Toady One
2023-09-01 07:49 lethosor Status new => assigned
2024-03-14 13:03 myk002 Note Added: 0042098