AqlaSolutions / AqlaSerializer

Binary serializer with full .NET support!
http://www.aqla.net
Other
17 stars 3 forks source link

Possible recursion detected #37

Closed inethui closed 2 years ago

inethui commented 2 years ago

I got the error message when I tried to deep clone an object twice: Possible recursion detected (offset: 8 level(s)): []

The first deep clone was successful, I checked the object's fields and everything seems to be ok. However, if I deep clone the same object again, I got an exception with the above error message.

The recursion stack dump is like this:

Stack:
[]
[]
[]
[]
[]
[]
[]
[]
[]

What does this error mean and how can I trouble-shoot it?

Thanks

inethui commented 2 years ago

The exception call stack is like this:

   at AqlaSerializer.ProtoWriter.CheckRecursionStackAndPush(Object instance)
   at AqlaSerializer.ProtoWriter.StartSubItem(Object instance, ProtoWriter writer, Boolean allowFixed)
   at AqlaSerializer.ProtoWriter.StartSubItem(Object instance, Boolean prefixLength, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.ProtoWriter.WriteRecursionSafeObject(Object value, Int32 key, ProtoWriter writer)
   at AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write(Object value, ProtoWriter dest)
   at AqlaSerializer.Meta.RuntimeTypeModel.Serialize(Int32 key, Object value, ProtoWriter dest, Boolean isRoot)
   at AqlaSerializer.Meta.TypeModel.DeepClone(Object value)
   at AqlaSerializer.Meta.TypeModel.DeepClone[T](T genericValue)
   at AqlaSerializer.Serializer.DeepClone[T](T instance)
AqlaSolutions commented 2 years ago

Please turn off AutoCompile before posting stack traces

inethui commented 2 years ago

This is the stack trace without AutoCompile:

AqlaSerializer.ProtoWriter.CheckRecursionStackAndPush
AqlaSerializer.ProtoWriter.StartSubItem
AqlaSerializer.ProtoWriter.StartSubItem
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.NoNullDecorator.Write
AqlaSerializer.Serializers.FieldDecorator.Write
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.NoNullDecorator.Write
AqlaSerializer.Serializers.FieldDecorator.Write
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.NoNullDecorator.Write
AqlaSerializer.Serializers.FieldDecorator.Write
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.NoNullDecorator.Write
AqlaSerializer.Serializers.FieldDecorator.Write
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.NoNullDecorator.Write
AqlaSerializer.Serializers.FieldDecorator.Write
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.NoNullDecorator.Write
AqlaSerializer.Serializers.FieldDecorator.Write
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.NoNullDecorator.Write
AqlaSerializer.Serializers.FieldDecorator.Write
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.NoNullDecorator.Write
AqlaSerializer.Serializers.FieldDecorator.Write
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.NoNullDecorator.Write
AqlaSerializer.Serializers.FieldDecorator.Write
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.NoNullDecorator.Write
AqlaSerializer.Serializers.FieldDecorator.Write
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.NoNullDecorator.Write
AqlaSerializer.Serializers.FieldDecorator.Write
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.NoNullDecorator.Write
AqlaSerializer.Serializers.FieldDecorator.Write
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.NoNullDecorator.Write
AqlaSerializer.Serializers.FieldDecorator.Write
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.NoNullDecorator.Write
AqlaSerializer.Serializers.FieldDecorator.Write
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.NoNullDecorator.Write
AqlaSerializer.Serializers.FieldDecorator.Write
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.NoNullDecorator.Write
AqlaSerializer.Serializers.FieldDecorator.Write
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.NoNullDecorator.Write
AqlaSerializer.Serializers.FieldDecorator.Write
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.NoNullDecorator.Write
AqlaSerializer.Serializers.FieldDecorator.Write
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.NoNullDecorator.Write
AqlaSerializer.Serializers.FieldDecorator.Write
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.NoNullDecorator.Write
AqlaSerializer.Serializers.FieldDecorator.Write
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.NoNullDecorator.Write
AqlaSerializer.Serializers.FieldDecorator.Write
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.TypeSerializer.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.ProtoWriter.WriteRecursionSafeObject
AqlaSerializer.Serializers.ModelTypeSerializer.AqlaSerializer.Serializers.IProtoSerializer.Write
AqlaSerializer.Serializers.NetObjectValueDecorator.Write
AqlaSerializer.Serializers.RootDecorator.Write
AqlaSerializer.Meta.RuntimeTypeModel.Serialize
AqlaSerializer.Meta.TypeModel.DeepClone
AqlaSolutions commented 2 years ago

Please read this: https://github.com/AqlaSolutions/AqlaSerializer/wiki/Member-Formats#latereference-mode

AqlaSolutions commented 2 years ago

Also the [] in the exception is ToString() of your object at the top of the serialization stack

AqlaSolutions commented 2 years ago

It's possible that you are trying to serialize a reference without reference tracking but it contains reference to itself inside

inethui commented 2 years ago

I tried "LateReference" but it didn't work. I'm frustrated that it works for the first clone but failed for the second clone. What could probably cause this kind of behavior? The code has been in production for more than 10 years successfully. Also with BinaryFormatter we don't have any issue.

AqlaSolutions commented 2 years ago

Then I would just use a debugger with a breakpoint at CheckRecursionStackAndPush to check what's going on.

inethui commented 2 years ago

I have found out the cause of this. Basically our code mistakenly treats IEnumerable types as ValueFormat.Compact.