View Issue Details

IDProjectCategoryView StatusLast Update
0001828Dwarf FortressGeneralpublic2010-06-09 07:56
Reportersuperradish Assigned ToToady One  
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Product Version0.31.03 
Fixed in Version0.31.06 
Summary0001828: Crash when doctor cleans patient with almost-depleted bar of soap (size goes negative?)
DescriptionEdit: Deactivating the hospital zone and removing beds has some effect on the crash. See the notes for superradish's reports.

This save is unstable. It's crashing based on an event like the month changing, the elves leaving, a new mayor getting elected, or some such. Submitting it in case it's a new bug: http://dffd.wimbli.com/file.php?id=2325
Steps To Reproduceload the game, unpause it. Wait.
Tagssuturer

Relationships

parent of 0001264 resolvedToady One Hospital causes game crash (save included) 
parent of 0002133 resolvedToady One Mysteriously crashes. 
parent of 0002054 resolvedToady One random crash - error.log 
parent of 0001917 resolvedToady One Repeatable 31.04/31.03 crash on load - hospital related 
parent of 0000839 resolvedToady One Crash when cleaning patient 
parent of 0001398 resolvedToady One 100% repeatable crash in fortress mode - hospital related 

Activities

Logical2u

2010-05-10 16:54

manager   ~0006521

I successfully had a mayor elected once while investigating this crash, but I wasn't able to resolve the crash by removing jobs, nobles, or the military.

superradish

2010-05-10 18:33

reporter   ~0006526

removing the hospital and the one burrow seems to have fixed the issue, i'll try just the burrow

superradish

2010-05-10 18:56

reporter   ~0006528

it's definitely the hospital - i'm currently narrowing down which hospital related thing is causing the problem.. i think it's the miner ber

superradish

2010-05-10 19:03

reporter   ~0006530

Last edited: 2010-05-11 07:53

found it - removing the hospital zone and individually treating the patients took care of it. I also made sure only one dwarf had the suture job set, i believe it's the suture job itself that was causing the crash. Things are running well now and it appears that i can continue this fort.

Logical2u

2010-05-10 19:08

manager   ~0006532

Last edited: 2010-05-10 19:13

Good catch radish. Deactivating the hospital zone temporarily stops the crash - I decided to remove some of the buildings in the hospital to see if that would save it, but it crashed after the removal of the top most traction bench and cabinet, and during the removal of the middle cabinet and one of the middle traction benches.

Edit: Well, deconstructing the beds underneath the patients and deactivating the hospital zone seems to fix the crash, so it's likely there's a crash-causing surgery job somewhere.

superradish

2010-05-11 07:52

reporter   ~0006546

funny thing is, i got hit by anything siege later and now the hospital is even more occupied - getting crashes again.. i have to shut the hospital off and do the jobs one at a time to prevent the crash

superradish

2010-05-11 10:20

reporter   ~0006548

to add more to the issue, sometimes a hospital bed gets bugged.. no surgeries or diagnoses will be performed until you remove the bed so the patient gets moved, then it'll work as normal. Also, after a patient is healed, you have to remove the bed to get them to get up and leave. (at least in the cases i've encountered with this game)

zergl

2010-06-03 09:58

reporter   ~0007612

Last edited: 2010-06-03 10:09

I was having a look at this crash after playing around with other healthcare related crashes.

Forbidding all items in the hospital's containers appears to prevent this crash as well (running for well past five minutes at 30-40 FPS now without crashing). I will try to narrow down which item exactly causes the bug. My bet is on a certain bar of soap or piece of thread.


edit: OK, looks like forbidding the bottom bar of soap in the top hospital zone coffer apparently prevents or at least postpones the crash (already running for several minutes again).
This could imply that this crash is related to http://www.bay12games.com/dwarves/mantisbt/view.php?id=2054

My personal crackpot guesstimating theory is that using a particular bar of soap which is almost used up sends its remaining "size" to a negative value leading to the crash.

user6

2010-06-03 11:28

  ~0007616

Okay, I'm consolidating the confirmed soap crashes under this report. The unconfirmed-but-suspicious ones are 0001264 and 0001398.

zergl

2010-06-03 11:35

reporter   ~0007618

I'm on to try and confirm these two, if you like.


Also, the uploaded save by Se5a in the notes for report 0001917 looks like another instance of the soap crash. Currently trying to get a save within a few frames of the crash to get a better testing environment, but I saw a doctor with a clean wound job suspiciously approach and start the job on a patient when it happened.

user6

2010-06-03 11:50

  ~0007619

I'm on to try and confirm these two, if you like.

That would be excellent.

And yeah, I saw your note on 0001917 and made that report a child of this one.

zergl

2010-06-03 12:27

reporter   ~0007628

Confirmed the first one and it seems to point towards my suspicion/theory of almost used up bars being too "small" and going negative.

The bar of forgotten beast soap in that instance is worth 42 units of soap in the hospital inventory screen. Forbidding it leads to the doc using a bar of cow soap instead of which around 50 units are used up (and no crash). I find this behavior too suspicious to be a coincidence, to be honest.

user6

2010-06-03 12:31

  ~0007629

Yeah, that's some compelling evidence. I'll put that theory in the summary.

zergl

2010-06-03 12:36

reporter   ~0007631

Just confirmed the second one too, and again, the bar causing the crash contained only 42 "soap-units" left.

Currently going at the save uploaded by Kumquat in the notes of the second report.

Toady One

2010-06-06 02:15

administrator   ~0007776

Yeah, it was the small bars -- when they became spent, it tried to use the dead pointer to record the exact soap material for the hospital log. It is fixed now for 0.31.06. Thanks to zergl for all the testing! That was very helpful.

Issue History

Date Modified Username Field Change
2010-05-10 14:15 superradish New Issue
2010-05-10 16:54 Logical2u Note Added: 0006521
2010-05-10 18:33 superradish Note Added: 0006526
2010-05-10 18:56 superradish Note Added: 0006528
2010-05-10 19:03 superradish Note Added: 0006530
2010-05-10 19:04 superradish Tag Attached: suturer
2010-05-10 19:08 Logical2u Note Added: 0006532
2010-05-10 19:13 Logical2u Note Edited: 0006532
2010-05-10 19:25 Logical2u Summary crashing within moments of loading game => crashing within moments of loading game - hospital related - save included
2010-05-10 19:25 Logical2u Description Updated
2010-05-11 07:52 superradish Note Added: 0006546
2010-05-11 07:53 superradish Note Edited: 0006530
2010-05-11 10:20 superradish Note Added: 0006548
2010-05-16 08:49 Logical2u Relationship added related to 0001264
2010-06-03 09:58 zergl Note Added: 0007612
2010-06-03 10:09 zergl Note Edited: 0007612
2010-06-03 11:26 user6 Relationship added parent of 0002133
2010-06-03 11:26 user6 Relationship added parent of 0002054
2010-06-03 11:26 user6 Relationship added parent of 0001917
2010-06-03 11:28 user6 Note Added: 0007616
2010-06-03 11:29 user6 Summary crashing within moments of loading game - hospital related - save included => Crash when dwarves try to use particular bar of soap - save included
2010-06-03 11:35 zergl Note Added: 0007618
2010-06-03 11:49 user6 Sticky Issue No => Yes
2010-06-03 11:50 user6 Note Added: 0007619
2010-06-03 12:10 user6 Relationship added related to 0000839
2010-06-03 12:26 user6 Relationship replaced parent of 0001264
2010-06-03 12:26 user6 Relationship added related to 0001398
2010-06-03 12:27 zergl Note Added: 0007628
2010-06-03 12:31 user6 Note Added: 0007629
2010-06-03 12:33 user6 Summary Crash when dwarves try to use particular bar of soap - save included => Crash when dwarves use an almost-depleted bar of soap (size goes negative?)
2010-06-03 12:36 zergl Note Added: 0007631
2010-06-03 12:42 user6 Relationship replaced parent of 0001398
2010-06-03 13:07 user6 Relationship replaced parent of 0000839
2010-06-03 13:08 user6 Summary Crash when dwarves use an almost-depleted bar of soap (size goes negative?) => Crash when dwarves use clean patient almost-depleted bar of soap (size goes negative?)
2010-06-03 13:08 user6 Summary Crash when dwarves use clean patient almost-depleted bar of soap (size goes negative?) => Crash when doctor cleans patient with almost-depleted bar of soap (size goes negative?)
2010-06-06 02:15 Toady One Note Added: 0007776
2010-06-06 02:15 Toady One Status new => resolved
2010-06-06 02:15 Toady One Fixed in Version => 0.31.06
2010-06-06 02:15 Toady One Resolution open => fixed
2010-06-06 02:15 Toady One Assigned To => Toady One
2010-06-06 09:37 user6 Sticky Issue Yes => No
2010-06-09 06:45 Toady One Status resolved => closed
2010-06-09 07:56 user6 Status closed => resolved