After updating to protobuf-net 3.0.101 from 2* version next exception start to throw on IOS xamarin project:

Exception while deserializing protobuf message|System.ExecutionEngineException: Attempting to JIT compile method 'void ProtoBuf.ProtoReader/State:ReadRepeatedCore<ProtoBuf.Serializers.ISerializer`1<MY_NAMESPACE.MY_SERIALIZED_TYPE>, ProtoBuf.Internal.ReadBuffer`1<MY_NAMESPACE.MY_SERIALIZED_TYPE>, MY_NAMESPACE.MY_SERIALIZED_TYPE> (ProtoBuf.Internal.ReadBuffer`1<MY_NAMESPACE.MY_SERIALIZED_TYPE>&,ProtoBuf.Serializers.SerializerFeatures,ProtoBuf.WireType,ProtoBuf.Serializers.ISerializer`1<MY_NAMESPACE.MY_SERIALIZED_TYPE>&,MY_NAMESPACE.MY_SERIALIZED_TYPE)' while running in aot-only mode. See https://learn.microsoft.com/xamarin/ios/internals/limitations for more information.

at ProtoBuf.ProtoReader+State.FillBuffer[TSerializer,T] (ProtoBuf.Serializers.SerializerFeatures features, TSerializer& serializer, T initialValue) <0x101b94570 + 0x00380> in <5518f96053c946f49d824de38cc4b388#242d546e165dc2b1b950bde811261286>:0 
at ProtoBuf.Serializers.RepeatedSerializer`2[TCollection,TItem].ReadRepeated (ProtoBuf.ProtoReader+State& state, ProtoBuf.Serializers.SerializerFeatures features, TCollection values, ProtoBuf.Serializers.ISerializer`1[T] serializer) <0x101ba4d10 + 0x002cf> in <5518f96053c946f49d824de38cc4b388#242d546e165dc2b1b950bde811261286>:0 
at ProtoBuf.Internal.Serializers.RepeatedDecorator`2[TCollection,T].Read (ProtoBuf.ProtoReader+State& state, System.Object value) <0x101d7f6b0 + 0x001bb> in <98f74c6f978b411d80efaccf4d87bd23#242d546e165dc2b1b950bde811261286>:0 
at ProtoBuf.Internal.Serializers.FieldDecorator.Read (ProtoBuf.ProtoReader+State& state, System.Object value) <0x101d52650 + 0x000af> in <98f74c6f978b411d80efaccf4d87bd23#242d546e165dc2b1b950bde811261286>:0 
at ProtoBuf.Internal.Serializers.TypeSerializer`1[T].DeserializeBody[TState] (ProtoBuf.ProtoReader+State& state, TState& bodyState, ProtoBuf.Internal.Serializers.TypeSerializer`1+StateGetter`1[T,TState] getter, ProtoBuf.Internal.Serializers.TypeSerializer`1+StateSetter`1[T,TState] setter) <0x101d648c0 + 0x00223> in <98f74c6f978b411d80efaccf4d87bd23#242d546e165dc2b1b950bde811261286>:0 
at ProtoBuf.Internal.Serializers.TypeSerializer`1[T].Read (ProtoBuf.ProtoReader+State& state, T value) <0x101d63220 + 0x00373> in <98f74c6f978b411d80efaccf4d87bd23#242d546e165dc2b1b950bde811261286>:0 
at ProtoBuf.ProtoReader+State.ReadAsRoot[T] (T value, ProtoBuf.Serializers.ISerializer`1[T] serializer) <0x101b5ac50 + 0x000e3> in <5518f96053c946f49d824de38cc4b388#242d546e165dc2b1b950bde811261286>:0 
at ProtoBuf.ProtoReader+State.DeserializeRoot[T] (T value, ProtoBuf.Serializers.ISerializer`1[T] serializer) <0x101b5ab60 + 0x00093> in <5518f96053c946f49d824de38cc4b388#242d546e165dc2b1b950bde811261286>:0 
at ProtoBuf.Serializer.Deserialize[T] (System.IO.Stream source) <0x101d25be0 + 0x00103> in <98f74c6f978b411d80efaccf4d87bd23#242d546e165dc2b1b950bde811261286>:0 
at ... stack-frames of my app

MY_NAMESPACE and MY_SERIALIZED_TYPE is just example of real types. For now, very simple type can not be deserialized:

[global::ProtoBuf.ProtoContract()]
public enum MY_SERIALIZED_TYPE
{
    SOME_VALUE = 1,
}

So, is there any success stories of using protobuf-net 3.* on xamarin IOS projects? What can I do with it?

0

There are 0 answers