Skip to content

InvalidOperationException serializing large object #117

@Flavelius

Description

@Flavelius

I have no pointer fields inside my classes, but i get this exception:

InvalidOperationException: Pointer or ThreadLocal or SpinLock encountered during serialization. The classes path that lead to it was: (MyType) => RuntimeType => RuntimeTypeHandle => IntPtr =>
Antmicro.Migrant.ObjectWriter.CheckLegality (System.Object obj, System.Collections.Generic.Dictionary2[TKey,TValue] parents) (at Assets/Scripts/Migrant/ObjectWriter.cs:264) Antmicro.Migrant.ObjectWriter.WriteValueType (System.Type formalType, System.Object value) (at Assets/Scripts/Migrant/ObjectWriter.cs:556) Antmicro.Migrant.ObjectWriter.WriteObjectsFields (System.Object o, System.Type type) (at Assets/Scripts/Migrant/ObjectWriter.cs:433) Antmicro.Migrant.ObjectWriter.WriteValueType (System.Type formalType, System.Object value) (at Assets/Scripts/Migrant/ObjectWriter.cs:587) Antmicro.Migrant.ObjectWriter.WriteObjectsFields (System.Object o, System.Type type) (at Assets/Scripts/Migrant/ObjectWriter.cs:433) Antmicro.Migrant.ObjectWriter.WriteObjectUsingReflection (Antmicro.Migrant.ObjectWriter objectWriter, System.Object o) (at Assets/Scripts/Migrant/ObjectWriter.cs:631) Antmicro.Migrant.ObjectWriter.WriteObjectInner (System.Object o) (at Assets/Scripts/Migrant/ObjectWriter.cs:415) Antmicro.Migrant.ObjectWriter.InvokeCallbacksAndExecute (System.Object o, System.Action1[T] action) (at Assets/Scripts/Migrant/ObjectWriter.cs:402)
Antmicro.Migrant.ObjectWriter.WriteObject (System.Object o) (at Assets/Scripts/Migrant/ObjectWriter.cs:112)
Antmicro.Migrant.Serializer.Serialize (System.Object obj, System.IO.Stream stream) (at Assets/Scripts/Migrant/Serializer.cs:109)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions