Duplicates in serialization

Aleks

New member
Hello!
After release, I encountered errors that cause infinite loading. This happens due to duplicates in serialization.

Why do duplicates appear in serialization?
Is it possible to fix this without having access to the code inside the DLL?

Here is the error code:
ArgumentException: An item with the same key has already been added. Key: 7621598125332611549
System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <152439c387994a8da523328132967f8d>:0)
System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) (at <152439c387994a8da523328132967f8d>:0)
Opsive.Shared.Utility.Serialization.DeserializeFields (System.Object obj, Opsive.Shared.Utility.MemberVisibility visibility, System.Func`2[T,TResult] onValidateTypeCallback, System.Func`4[T1,T2,T3,TResult] onValidateCallback) (at <755b9cd2c80348a2ad443ee0ea2761a6>:0)
Opsive.Shared.Utility.Serialization.DeserializeFields (Opsive.Shared.Utility.MemberVisibility visibility, System.Func`2[T,TResult] onValidateTypeCallback, System.Func`4[T1,T2,T3,TResult] onValidateCallback) (at <755b9cd2c80348a2ad443ee0ea2761a6>:0)
Opsive.UltimateInventorySystem.SaveSystem.InventorySystemManagerItemSaver.DeserializeAndLoadSaveData (Opsive.Shared.Utility.Serialization serializedSaveData) (at Assets/Opsive/UltimateInventorySystem/Scripts/SaveSystem/InventorySystemManagerItemSaver.cs:302)
 
I'm really sorry to hear that this is happening on a release build.

What Unity version and what UltimateInventorySystem version are you using?
I remember we had a similar issue a long long time ago, I was absolutely convinced it was fixed, so I'm surprised to see it popup again. I just want to make sure you are not using an old version of UIS.
Also if you could share your save file, it might help identify the issue

@Justin should know more about the serialization system
 
Thanks for your reply!
I'm glad if this problem is fixed in new versions. This bug is rare, but it breaks the game.
Before updating packages, I would like to clarify whether this error was fixed after my version?

My versions:
Unity 6000.0.59f2 URP
Ultimate Inventory System 1.2.22
Ultimate Character Controller 3.1.3
 
Back
Top