CleverRaven / Cataclysm-DDA

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

Contents index greater than contents size error report #75607

Open Gaming-Doggy opened 1 month ago

Gaming-Doggy commented 1 month ago

Describe the bug

During loading of the game, I was given this error report:

DEBUG : contents index greater than contents size

FUNCTION : void item_location::deserialize(const JsonObject&) FILE : src/item_location.cpp LINE : 854 VERSION : c06f12d

Attach save file

Keyesport.zip

Steps to reproduce

Load in

Expected behavior

No error on loadin

Screenshots

No response

Versions and configuration

Additional context

Still able to continue to play after progressing past the error.

PatrikLundell commented 1 month ago

/Confirmed

I've seen that kind of error before. The problem with this general type of errors is that it's very hard to figure out what went wrong, because the report only shows that something went wrong during the game saving, but not really what or why.

It can be noted that I get several reports of things not fitting in containers, so it might be that this failure might be related to one of those (number of items decreasing in a container because something couldn't fit, and the item_location then trying to reference item number X when there are fewer than X items left in the container). Note that this is just a guess.

If it's any consolation, item_location errors are generally fairly benign. It can e.g. cause crafting to be broken off because the in_progress item couldn't be found.