[BUG] An item with the same key has already been added

phonoks

New member
Hello,

i am having a problem with the save system, after my inventory exceeds 100 items, i get the error when loading :
ArgumentException: An item with the same key has already been added. Key: -920785808

Duplicated id always has the same key.

Capture.PNG


i am using unique and mutable items.

i have made a small project that you can check out to duplicate the issue.
here is the assets file google drive link :

Replace Assets with the Assets that i provided, set up inventory system with my provided database, play the game, press the button to twice to add 200 items, close the game and see the error.

Thanks for the help in advance!

(mod edit: please do not share links to assets in your post - not everyone who reads this post has a license to the linked assets)
 
Last edited by a moderator:
It looks like you do not have the latest version of UIS.
Could you upgrade to the latest version and try again? If the error persists, please send us your project by email at support@opsive.com
 
We also encountered the same problem and tried to reproduce it in the Demo scene. Assets\Opsive\UltimateCharacterController\Integrations\UltimateInventorySystem\Demo
1 In the integration scene between TPC and UIS, left only one item in the character's inventory, such as a pistol.
2 Change the quantity to above 346. or higher.
3 Run the game and save directly.
4 Then load the game. The following error message will appear.
ArgumentException: An item with the same key has already been added. Key: 1140678350

It may be the same problem, but the key is different.
Versions we tested include UIS 1.2.11, 1.2.13, TPC 2.48 3.06.th1.pngth2.pngth3.png
 
I have this fixed but it ended up requiring a decent amount of changes. This means that you will be required to update to the latest version of inventory and the controller. I have some thoughts for how to fix it without so many modifications but I won't be able to try these out until later next week.
 
I have this fixed but it ended up requiring a decent amount of changes. This means that you will be required to update to the latest version of inventory and the controller. I have some thoughts for how to fix it without so many modifications but I won't be able to try these out until later next week.
Thanks, looking forward to good news :d ,The hope of our whole team is here. ?
 
Top