semlanik / qtprotobuf

Protobuf generator and bindings for Qt framework
https://semlanik.github.io/qtprotobuf
MIT License
170 stars 37 forks source link

"Container is less than required fields number. Deserialization failed" error #252

Open cooked opened 3 years ago

cooked commented 3 years ago

Hi, I'm getting the following error while I'm trying to deserialize a proto containing a repeated value

terminate called after throwing an instance of 'std::out_of_range'
  what():  Container is less than required fields number. Deserialization failed 

The application is running fine for 20-30 seconds, correctly deserializing messages, then the error occurs.

I confirmed that the proto is the same used to generate code on both ends (Qt and C++)

message Telemetry {
  Chip chip = 1;
  Channel channel = 2;
  repeated int32 value = 3;
}

What is the workflow, and points to look into, to find the root cause of the issue?

Thanks, Stef

semlanik commented 3 years ago

Looks like bug to me. If you could run your application in debug mode and send the stack trace(at least QtProtobuf related part), I would appreciate.