Been running into an issue with Managed deserialization when loading subscenes asynchronously (turning off parallel loading stops issue happening)
Parameter name: index
System.Array.InternalArray__set_Item[T] (System.Int32 index, T item) (at <314938d17f3848e8ac683e11b27f62ee>:0)
(wrapper managed-to-managed) Interactions.Client.Data.IndicatorRuntimeModifiers.GameObjectStateModifierRuntime[].System.Collections.Generic.IList`1.set_Item(int,Interactions.Client.Data.IndicatorRuntimeModifiers.GameObjectStateModifierRuntime)
Unity.Properties.IndexedCollectionPropertyBag`2+ListElementProperty[TList,TElement].SetValue (TList& container, TElement value) (at <1f2827b3bbf948c595ac00ad59b25baf>:0)
Unity.Entities.ManagedObjectRemap.Unity.Properties.IPropertyVisitor.Visit[TContainer,TValue] (Unity.Properties.Property`2[TContainer,TValue] property, TContainer& container) (at Library/PackageCache/com.unity.entities@bce0b9d843e1/Unity.Entities/Properties/ManagedObjectRemap.cs:174)```
I've done a bunch of debugging on this and I'm pretty sure it's a threading issue with Properties package and IndexedCollectionPropertyBag - which is either not designed to be used multithreaded like Entities is doing OR it's just a bug in the properties module.
Unfortunately the properties package is now a module inside UnityEditor so my ability to modify and debug it better is limited but here are my results.
The error is caused because for example, it's trying to write to index 4 in an array of length 3