Details
-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
None
-
6.8.2
-
None
Description
Whenever I use a protobuf message with `oneof`, and serialize it with QProtobufSerializer, the binary raw data seems fine.
However, when deserializing, an assert fails if you don't have all oneof fields set. This is against the core purpose of the oneof field. To avoid failure, I have to set every single oneof field; and this would result in the `hasX` for every oneof field to return true, which defeats the purpose.
If anything, this shouldn't crash the program (assert), but gracefully handle it. Best case is that it handles oneof properly.
I tried looking at the source code, but quickly realized I should perhaps use official protobufs for this use case.
Hope this helps!