protobuf-net - Protobuf-net 反序列化异常数溢出
问题描述
在点网中反序列化 protobuf 数据时出现异常。我收到号码溢出异常。有什么方法可以让我得到哪个字段给出错误,因为原型结构非常大。
日志是这样的
09-12 12:55:50.318 9188 9507 E Unity : Proto DEserialize exception : System.OverflowException: Number overflow.
09-12 12:55:50.318 9188 9507 E Unity : at ProtoBuf.ProtoReader.TryReadUInt32VariantWithoutMoving (bool,uint&) <0x00328>
09-12 12:55:50.318 9188 9507 E Unity : at ProtoBuf.ProtoReader.ReadUInt32Variant (bool) <0x0002f>
09-12 12:55:50.318 9188 9507 E Unity : at ProtoBuf.ProtoReader.ReadInt32 () <0x00057>
09-12 12:55:50.318 9188 9507 E Unity : at (wrapper dynamic-method) King.Data.GetUserdataInfoStruct.proto_2 (object,ProtoBuf.ProtoReader) <0x006c3>
09-12 12:55:50.318 9188 9507 E Unity : at ProtoBuf.Serializers.CompiledSerializer.ProtoBuf.Serializers.IProtoSerializer.Read (object,ProtoBuf.ProtoReader) <0x00037>
09-12 12:55:50.318 9188 9507 E Unity : at ProtoBuf.Meta.RuntimeTypeModel.Deserialize (int,object,ProtoBuf.ProtoReader) <0x00113>
09-12 12:55:50.318 9188 9507 E Unity : at ProtoBuf.Meta.TypeModel.DeserializeCore (ProtoBuf.ProtoReader,System.Type,object,bool) <0x0006b>
09-12 12:55:50.318 9188 9507 E Unity : at ProtoBuf.Meta.TypeModel.Deserialize (System.IO.Stream,object,System.Type,ProtoBuf.SerializationContext) <0x000a7>
09-12 12:55:50.318 9188 9507 E Unity : at ProtoBuf.Meta.TypeModel.Deserialize (System.IO.Stream,object,System.Type) <0x0003b>
09-12 12:55:50.318 9188 9507 E Unity : at ProtoBuf.Serializer.Deserialize<King.Data.GetUserdataInfoStruct> (System.IO.Stream) <0x00043>
09-12 12:55:50.318 9188 9507 E Unity : at King.Proto.KingProtBufSerialize
解决方案
推荐阅读
- apache - 带有 Apache 代理 + Gunicorn 的 Flask 应用程序无法在 HTTPS 上运行
- php - WordPress 插件仅在生产激活时导致 503 错误
- json - 以 JSON 格式格式化数据新行、顺序和跳过数据
- influxdb - 如何在 Flux Query 中将窗口函数的输出转换回时间序列
- c++ - QT环境下如何设置libtorch(我的系统:win10、qt5.14、)
- python - 有没有更简单的方法从 groupby 获取对象并放入字典?
- docker - Docker构建文件映像问题
- python - python matplotlib:onclick不起作用,请告诉我为什么以及如何暂停和恢复动画,
- r - 填写常数值,当dplyr中满足条件时加1
- python - 我正在做作业,当输入负数时,此代码需要打印错误消息