Cataclysm-dda: Huge log file due to broken bone spam

Created on 10 Nov 2020  路  2Comments  路  Source: CleverRaven/Cataclysm-DDA

Describe the bug

The game logs a huge number of broken bones: https://www.reddit.com/r/cataclysmdda/comments/ji05pt/674975_broken_bones/

I think maybe it logs each action taken with a broken bone as a new broken bone?

Each broken bone adds a line in the log, so this leads to a huge log file. In my case, I had a 2 million line / 200mb log file, which reduced down to 900 lines/90kb after cutting out all the broken bone messages.

(S2 - Confirmed) <Bug> Achievements / Conducts / Scores

Most helpful comment

Confirmed in 0.E-7424-gcbcf5fd9bd. Breaking my left leg once results in 6 "broken left leg" events. Waiting 1 turn with a broken left leg adds 1 more "broken left leg" event. This is the scores log, 2 turns after breaking my left leg, indicating a total of 8 broken bones:

image

Waiting 5 minutes adds 299 more "broken left leg" events to the log:

image

image

So indeed; it appears to be recording a new broken bone with every turn.

Edit This section of suffer.cpp emits a new broken_bone event for every turn that passes while the bone is broken:

https://github.com/CleverRaven/Cataclysm-DDA/blob/c78f54f98534ae1deaafdacc10b741d1fd1404c7/src/suffer.cpp#L1591-L1596

All 2 comments

Confirmed in 0.E-7424-gcbcf5fd9bd. Breaking my left leg once results in 6 "broken left leg" events. Waiting 1 turn with a broken left leg adds 1 more "broken left leg" event. This is the scores log, 2 turns after breaking my left leg, indicating a total of 8 broken bones:

image

Waiting 5 minutes adds 299 more "broken left leg" events to the log:

image

image

So indeed; it appears to be recording a new broken bone with every turn.

Edit This section of suffer.cpp emits a new broken_bone event for every turn that passes while the bone is broken:

https://github.com/CleverRaven/Cataclysm-DDA/blob/c78f54f98534ae1deaafdacc10b741d1fd1404c7/src/suffer.cpp#L1591-L1596

This probably explains the 1GB log file that I had and couldn't open the other day. I couldn't find the cause at the time because I couldn't even open it but my character did have all 4 limbs broken at the time.

Was this page helpful?
0 / 5 - 0 ratings