CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.71k stars 4.2k forks source link

Crash when debug spawning item clashes with bugged smoker report #76008

Open PatrikLundell opened 3 months ago

PatrikLundell commented 3 months ago

Describe the bug

The following annoying report has been generated for quite some time, but so far it has just been annoying.

DEBUG : tried to put an item (charcoal) count (137880) in a container (fake_char_smoker) that cannot contain it: pocket unacceptable because tried to put too many charges of ammo in item

FUNCTION : put_in FILE : C:\Cataclysm-DDA\src\item.cpp LINE : 1803 VERSION : 0.G-11687-g348453333a

I believe it's caused by the smoking racks. I've seen inconsistencies in how much charcoal they would accept, so there may be an issue with the code determining how much space remains. Also note that the save is a couple of months old.

However now it causes the game to crash when somehow brought up by the debug item spawn menu, presumably because it being subjected to ImGui conversion.

Attach save file

Hawaiian Ocean View-trimmed.tar.gz

Steps to reproduce

  1. Load the save.
  2. Walk out of the basement (Exit to the East. I've walked a couple of steps further onto the path when getting out).
  3. Bring up the debug item spawn menu.
  4. Get it overlayed by the bug report above.
  5. Press up or down arrow to clear out the debug menu and see the error message without the clutter (probably not needed).
  6. 'I'gnore the error report.
  7. Have the game terminate.

Expected behavior

If an error report is overlayed on the debug item spawn menu the game shouldn't crash when the report is dismissed.

Screenshots

No response

Versions and configuration

Additional context

Edit: Further info: If I examine the first smoker I get the error report, and when that is out of the way, the debug spawning menu can be brought up and used successfully. Thus, the issue is really about the inability of the changed UI system to handle error reports on top of it, rather than this particular trigger, which is easy to work around (but still a pain to get if you haven't saved in a while).

PatrikLundell commented 3 months ago

@NetSysFire: Notifying you about the malware post above.

mqrause commented 3 months ago

59189 for more info on the pocket error.