When I load my save, the game displays an error (see screenshot), and several items (a wooden spear, a hacksaw, and a stone shovel) fall on the ground at my feet. These are all items that I _have_ had in my inventory at one point or another, but do not currently have in my inventory when saving the game. In the case of the hacksaw, the original doesn't even exist, as it has been crafted into a survivor utility belt.
For items to not spontaneously appear on the ground at my feet when I load the game.
The Error
The Items (multiple due to testing, it's 1 of each per load)
Same as #41648
Is it? They seem like completely unrelated issues...
The game is freezing because items are being cloned on load, and now there are literally thousands of items in a pocket where they don't fit. The cause of that issue is what this one describes.
It is happening with me too. My water purification tablet got multiplied till it was so heavy that I couldn't lift it, then I threw it in the fire and got another (15) but it is multiplying again... I have a small cardboard box with (1000) toast-em and the box itself is over 100 Kg, and I have a bucket "with 2 items" that when I wield it it becomes "none" and the bucket itself weighs 1253003,05 Kg...
Every time I wield it I am thrown on the floor hahaha
Yep, just thrown my leather backpack with 60000 crowbars in it into my fireplace.
There are several points may be related to duplication.
Even this is redundant, it should have been fine though, but then there is something may break the if-statement.
Lets assume that can_contain is totally ok.
while trying to call item_pocket::insert_item , if the pocket is not container, magazine or magazine_well (for example: MOD), the item will be forced to be put into that pocket regardless of return value(true/false) . If the return value is false, that item will also be added to uninserted_items  and put into "MIGRATION".
And even in the original codes
it may cause duplication for the same reason.
beside of this, in #41733 the pocket type was removed, I don't know what will happen if a pocket dosn't have a  type in json defined. Edit: nevermind, they are by default CONTAINER type viaoptional()
The problem can only be reproduced by saving/loading several times, so it is a bit hard to track and test. Such problems may need confirmation of the author of nested container.
PS: the hard part of solving  container problems is to fix the corrupted save. one json change may get things to somewhere they shouldn't be and break everything. For a bad save ppl don't even know where an item should be, how could the "combine" function work properly?(If A gun never has CONTAINER pocket, we know mods should be in MOD. But if it has? where should the mods be?)  Can only devide pockets into different types(and combine) if they are "good" before loading.
I believe I have found a way to trigger this bug in a clean save file. Can someone please tell me whether this is the same bug or not?
[
  {
    "type": "MOD_INFO",
    "ident": "BUG",
    "name": "BUG",
    "category": "items"
  },
  {
    "type": "GENERIC",
    "id": "this_changes_volume_between_versions",
    "category": "other",
    "name": {"str": "BUG"},
    "description": "BUG",
    "weight": "1 g",
    "price": 800,
    "material": [ "paper" ],
    "symbol": "*",
    "color": "light_gray",
    "volume": "4 L"
  }
]
Same as above except instead of step 2 you should wear a backpack (id: backpack) and put the purse in the backpack
Note that this seems different from what others have described - they say things like "60000 crowbars" but I see no way to find out the contents of my "purse with 11 items"
They merged a fix that fixed this, or something like this, for me. Can the poster try the save that had this problem and try to recreate it to see if it still happens on the latest experimental?
I can no longer reproduce the variant 1 I described above. Variant 2 is still not fully fixed ("purse with none" stays and BUG is never dropped on the ground see #42273), but it no longer causes duplication.
- OS: Linux
    - OS Version: LSB Version: :core-4.1-amd64:core-4.1-noarch; Distributor ID: Fedora; Description: Fedora release 32 (Thirty Two); Release: 32; Codename: ThirtyTwo; 
- Game Version: 0.E-4254-gfea0266 [64-bit]
- Graphics Version: Tiles
- Game Language: System language []
- Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    BUG [BUG]
]
                    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not \'bump\' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.
This issue has been automatically closed due to lack of activity. This does not mean that we do not value the issue. Feel free to request that it be re-opened if you are going to actively work on it
Most helpful comment
Yep, just thrown my leather backpack with 60000 crowbars in it into my fireplace.