The version is libprotobuf9:armhf 2.6.1-1, it does not look like an older version. I am certain the problem is not the size, I am aware of that the wrong size could cause the problem. The protobuf library did not like some characters, if I put some string filed with empty string, it would work in most of times, but that is also not consistent, some time it could fail again.
Is there anyway to display google libprotobuf error message when ParseFromArray failed? It is very hard to debug the message before failing on deserialization. If you could share me tricks how to debug protobuf message when failing on ParseFromArray, I'll much appreciate it.
Thank you.
On Wednesday, February 15, 2017 at 2:06:53 AM UTC+11, Adam Cozzette wrote:
If ParseFromArray() is returning different results for the same serialized proto then that does sound like a bug. Do you have an example of a proto that triggers this behavior? Also, what version of the protobuf compiler and library are you using? I suspect Debian might be packaging an older version of it and so if you're using the package that comes with Debian then that might be a bit stale.
It might also be worth double-checking that you're passing the right size to ParseFromArray(); I can imagine that if you pass a size that's a few bytes too large then you would get unpredictable results as the code tries to parse beyond the end of the actual proto data.
Hi,
I am running protobuf C++ on Debian Jessie, most of the messages work fine, but one message is not stable, ParseFromArray from the same message sometime return false sometime return true, the protobuf library complains string tokenRef invalid non-UTF-8 characters. It worries me the inconsistent return value from the ParseFromArray, if the size was wrong or if the invalid non-UTF-8 characters caused the problems, why sometime it can be passed to return true? Has anyone seen this behavior?
Thanks for your comments in advance.
--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.