I'll just say that I'm new to using protobuf. I'm having an issue with 
parsing proto messages that contain sub-messages with repeated fields. I 
have a test app that has a function that creates the message and saves it 
to a buffer. I have another function that I send that buffer into to parse 
the message. I get a FatalException when I parse the buffer in the second 
function. Below is an example of the message structure I am using. In the 
example messages below, I only get the FatalException when PersonInfo's pto 
field is populated. If the pto field isn't populated, I don't see a parsing 
issue.

So I'm seeing my issue when the first sub-message's (PersonInfo) repeated 
field is populated. Has anyone else seen this or can give me a bone as to 
what I'm doing wrong?

Not sure if it matters on the language flavor. I'm using the C++ output for 
my protobuf messages.

message PtoDays
{
uint64 date = 1;
string reason = 2;
}

message PersonInfo
{
string phone_number = 1;
int32 phone_type = 2;
repeated PtoDays pto = 3;
}

message MainPkt
{
string id = 1;
repeated PersonInfo info = 2;
}

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to