- changed component to Game Logic
HP indicator shows full HP, despite taking damage
During a fight, I noticed from the log on the bottom-right that I had taken 61 points of damage, but the relevant indicator on the left of the screen still showed full HP.
I took a screenshot which shows the disparity between the logged damage and the HP indicator (attached), then saved the game and loaded it again. This brought the HP indicator back into sync: it now showed the correct value of 148 / 209 HP, reflecting the damage that had been taken.
However, the next time I took damage, the HP indicator again failed to show the damage.
Comments (17)
-
reporter -
Do you still have the saved game? It would be a great help, thanks.
-
reporter Hmm, unfortunately I didn’t take a copy of the savegame at that time. The game has progressed beyond that point and the problem is no longer reproducing, so the current save might not be useful.
If I see it happen again, I’ll attach a savegame to this issue.
-
reporter OK, the issue has now reproduced, and I have a savegame along with a screenshot of the problem before saving & exiting. But I’m having trouble attaching the savegame to this ticket, after multiple attempts in two browsers. The Bitbucket API seems to go unresponsive, perhaps it has difficulty with the size of the save (20mb).
Is there an email address I can send it to instead?
-
Can you upload it to a file upload service, e.g. https://www.transfernow.net/en ?
-
reporter Uploaded here: https://www.transfernow.net/dl/20210903xUK32xaR
I’m also replacing the screenshot in this ticket to match the attached save. The screenshot was taken just before saving & quitting, and shows the out-of-sync situation. When the save is loaded, the HP indicator should be back in sync, but it should fall out of sync again the next time damage is taken.
Note that the save is from 31st Aug and therefore is from an earlier 1.0.0 build.
-
reporter - attached HpIndicatorOutOfSync.jpg
-
Hm… so far everything seems to be just working fine.
-
Maybe I don’t understand where the issue is. I loaded the saved game, fully healed up. Then the game log showed that I got hit by the stone statue for a damage of 27. So 311-27 = 284 which is also shown in the statistics on the left.
-
reporter Thanks for looking, and I’m sorry it doesn’t show up on your end. Perhaps it could be something that replicates on one machine but not another - particularly if multiple threads are a factor. (I am well-acquainted with the joys of concurrency bugs!)
The screenshot that I attached to the ticket does show that it happened for me, at least. If you compare the HP indicator on the left of my screenshot to the floating HP indicator above my character’s head, it is clear that they were not in sync when the screenshot was taken. But when I load the game again, those bars go back into sync with each other - at least until I take the next round of damage.
Given that this reproduces on my side but not yours - if there’s any extra debug logging I could enable which might be of help, let me know. I could then try to reproduce it with the extra logging, and send you the logs.
-
I’ll continue to investigate. Which platform do you play on (Windows, macOS, Linux)?
-
reporter I’m on Windows 10. Thank you for investigating. I’ll mention if I see the issue again.
-
reporter FYI, I have seen the issue again on the current build of ADOM.
In the screenshot below, I have just taken 10 damage (visible in log). The main HP indicator on the left shows 15 HP; but actually, my character has 5 HP right now. The little HP indicator floating above his head seems to be the accurate one in this situation.
If I save, quit and load the game, this brings the indicators back into sync (i.e. the main HP indicator now shows 5 HP, correctly) - at least until next time. Unfortunately this also means that if I send you a save, it does not necessarily help you to reproduce the problem.
-
Thanks for the information. I’ve already reworked the healthbar code so that this should not happen anymore.
-
- changed status to resolved
I could reproduce the problem with breath attacks from a stone statue. We now make sure the statistics are always updated again at the end of the turn.
-
- changed milestone to Fixed in version 1.0.1
-
- changed milestone to Fixed in version 1.1.0
- Log in to comment