Closed inethui closed 2 years ago
Hi, without a reproducable example it's impossible to say what's going on.
The setup is complicated and involves many core business objects in our system. So I don't know how to create a reproducible example for you to take a look. However, I can debug into Aqla, are there some classes or methods I should watch closely in order to trouble shoot this issue?
In deserialization, does Aqla follow the object reference chain? For example, if class A has a field "b" which reference class B, would Aqla deserialize B before finish up deserializing A?
I noticed that there are two kinds of call stacks in deserialization:
AqlaSerializer.Serializers.CompiledSerializer.AqlaSerializer.Serializers.IProtoSerializer.Read Line 74
AqlaSerializer.Meta.RuntimeTypeModel.Deserialize Line 1080
AqlaSerializer.ProtoReader.ReadTypedObject Line 787
AqlaSerializer.ProtoReader.ReadObject Line 773
and
AqlaSerializer.NetObjectCache.GetKeyedObject Line 46
AqlaSerializer.NetObjectHelpers.ReadNetObject_End Line 37
The second one is the failed one. Does this indicate something abnormal?
The setup is complicated and involves many core business objects in our system. So I don't know how to create a reproducible example for you to take a look.
Try removing fields one by one until you find which one causes this. Then you can make a reproducable example to post here.
This exception tells that there is an attempt to retrieve object reference which was not constructed yet. It's impossible to say anything more from the compiled stacktrace. At least you should try disabling RuntimeTypeModel.AutoCompile
.
I would put a few breakpoints inside NetObjectHelpers methods to understand what's going on. You can also make use of RuntimeTypeModel.GetDebugSchema
method to understand the structure of serializers.
In deserialization, does Aqla follow the object reference chain? For example, if class A has a field "b" which reference class B, would Aqla deserialize B before finish up deserializing A?
Usually yes but there is an index of all keyed objects at the start of stream unless you use some switches of ProtoCompatibility
.
I figured this out, it's a problem on our side. Thanks a lot for the help!
I got the following exception when trying to deserialize an object, any idea what's wrong?