Issue #149 resolved
jeroen dela cruz
created an issue

These was log on Unity Performance Reporting:

ExecutionEngineException: Attempting to call method 'Sirenix.Serialization.DictionaryFormatter`2[[System.Int32, mscorlib, Version=2.0.0.0, Culture=, PublicKeyToken=b77a5c561934e089],[UnityEngine.Sprite[], UnityEngine, Version=0.0.0.0, Culture=, PublicKeyT

System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)
Sirenix.Serialization.FormatterLocator.CreateFormatter (System.Type type, ISerializationPolicy policy)
Sirenix.Serialization.FormatterLocator.GetFormatter (System.Type type, ISerializationPolicy policy)
Sirenix.Serialization.ComplexTypeSerializer`1[T].WriteValue (System.String name, .T value, IDataWriter writer)
Sirenix.Serialization.Serializer`1[T].WriteValueWeak (System.String name, System.Object value, IDataWriter writer)
Sirenix.Serialization.UnitySerializationUtility.SerializeUnityObject (UnityEngine.Object unityObject, IDataWriter writer, Boolean serializeUnityFields)
Sirenix.Serialization.UnitySerializationUtility.SerializeUnityObject (UnityEngine.Object unityObject, System.Byte[]& bytes, System.Collections.Generic.List`1& referencedUnityObjects, DataFormat format, Boolean serializeUnityFields, Sirenix.Serialization.SerializationContext context)
Sirenix.Serialization.UnitySerializationUtility.SerializeUnityObject (UnityEngine.Object unityObject, SerializationData& data, Boolean serializeUnityFields, Sirenix.Serialization.SerializationContext context)
Sirenix.OdinInspector.SerializedMonoBehaviour.UnityEngine.ISerializationCallbackReceiver.OnBeforeSerialize ()
Tools.InstantiateResource (System.String p_path, UnityEngine.Transform p_parent)
Tools.InstantiateResource[T] (System.String p_path, UnityEngine.Transform p_parent)
MonoManager`1[T].Create (UnityEngine.Transform p_parent)
GameLoader.CreateManagers ()
GameLoader.Awake ()
Rethrow as TypeInitializationException: The type initializer for 'Sirenix.Serialization.DictionaryFormatter<System.Int32,UnityEngine.Sprite[]>' threw an exception.
System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)
Sirenix.Serialization.FormatterLocator.CreateFormatter (System.Type type, ISerializationPolicy policy)
Sirenix.Serialization.FormatterLocator.GetFormatter (System.Type type, ISerializationPolicy policy)
Sirenix.Serialization.ComplexTypeSerializer`1[T].WriteValue (System.String name, .T value, IDataWriter writer)
Sirenix.Serialization.Serializer`1[T].WriteValueWeak (System.String name, System.Object value, IDataWriter writer)
Sirenix.Serialization.UnitySerializationUtility.SerializeUnityObject (UnityEngine.Object unityObject, IDataWriter writer, Boolean serializeUnityFields)
Sirenix.Serialization.UnitySerializationUtility.SerializeUnityObject (UnityEngine.Object unityObject, System.Byte[]& bytes, System.Collections.Generic.List`1& referencedUnityObjects, DataFormat format, Boolean serializeUnityFields, Sirenix.Serialization.SerializationContext context)
Sirenix.Serialization.UnitySerializationUtility.SerializeUnityObject (UnityEngine.Object unityObject, SerializationData& data, Boolean serializeUnityFields, Sirenix.Serialization.SerializationContext context)
Sirenix.OdinInspector.SerializedMonoBehaviour.UnityEngine.ISerializationCallbackReceiver.OnBeforeSerialize ()
Tools.InstantiateResource (System.String p_path, UnityEngine.Transform p_parent)
Tools.InstantiateResource[T] (System.String p_path, UnityEngine.Transform p_parent)
MonoManager`1[T].Create (UnityEngine.Transform p_parent)
GameLoader.CreateManagers ()
GameLoader.Awake ()
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)
Sirenix.Serialization.FormatterLocator.CreateFormatter (System.Type type, ISerializationPolicy policy)
Sirenix.Serialization.FormatterLocator.GetFormatter (System.Type type, ISerializationPolicy policy)
Sirenix.Serialization.ComplexTypeSerializer`1[T].WriteValue (System.String name, .T value, IDataWriter writer)
Sirenix.Serialization.Serializer`1[T].WriteValueWeak (System.String name, System.Object value, IDataWriter writer)
Sirenix.Serialization.UnitySerializationUtility.SerializeUnityObject (UnityEngine.Object unityObject, IDataWriter writer, Boolean serializeUnityFields)
Sirenix.Serialization.UnitySerializationUtility.SerializeUnityObject (UnityEngine.Object unityObject, System.Byte[]& bytes, System.Collections.Generic.List`1& referencedUnityObjects, DataFormat format, Boolean serializeUnityFields, Sirenix.Serialization.SerializationContext context)
Sirenix.Serialization.UnitySerializationUtility.SerializeUnityObject (UnityEngine.Object unityObject, SerializationData& data, Boolean serializeUnityFields, Sirenix.Serialization.SerializationContext context)
Sirenix.OdinInspector.SerializedMonoBehaviour.UnityEngine.ISerializationCallbackReceiver.OnBeforeSerialize ()
Tools.InstantiateResource (System.String p_path, UnityEngine.Transform p_parent)
Tools.InstantiateResource[T] (System.String p_path, UnityEngine.Transform p_parent)
MonoManager`1[T].Create (UnityEngine.Transform p_parent)
GameLoader.CreateManagers ()
GameLoader.Awake ()
Sirenix.Serialization.UnitySerializationUtility:SerializeUnityObject(Object, IDataWriter, Boolean)
Sirenix.Serialization.UnitySerializationUtility:SerializeUnityObject(Object, Byte[]&, List`1&, DataFormat, Boolean, SerializationContext)
Sirenix.Serialization.UnitySerializationUtility:SerializeUnityObject(Object, SerializationData&, Boolean, SerializationContext)
Sirenix.OdinInspector.SerializedMonoBehaviour:UnityEngine.ISerializationCallbackReceiver.OnBeforeSerialize()
Tools:InstantiateResource(String, Transform)
Tools:InstantiateResource(String, Transform)
MonoManager`1:Create(Transform)
GameLoader:CreateManagers()
GameLoader:Awake()

That's the whole log. there are others that causes crash.

I will be attaching the other logs.

there are other more logs.

Comments (8)

  1. Tor Esa Vestergaard
    • changed status to open

    Thanks for reporting this - I've been having trouble replicating it.

    Might I ask, on which platform and in which situation did this occur? Which version of Odin were you using? And which version of Unity were you using?

  2. Tor Esa Vestergaard

    Try upgrading to Odin 1.0.3 - this looks a lot like an error we've already fixed. Here's the changelog, and this is the relevant part of it:

    • Fixed an issue where dictionary, hashset, list, nullable and generic collection serialization formatters would be broken on IL2CPP builds due to incorrect stripping of their constructors. This would cause a multitude of deserialization errors when running builds on IL2CPP platforms.

    If it still occurs after you've upgraded, please let us know.

  3. Log in to comment