Skip to content

Why can Zserio serialize varuint32 arrays but not deserialize them? #615

Answered by Mi-La
Yesyoor asked this question in Q&A
Discussion options

You must be logged in to vote

Ah .. I was finally able to debug your project somehow. I have probably found the source of your problem.
It seems to be caused partially by your wrong data and partially by our weak safety checks, which should clearly catch you immediately during serialization!

Poi defines position with hardcoded coordShift=0 (see the schema Position2D(0)), but you set it to 5 in Main.java on line 162 (method generatePoiMessageList).

Normally we check the parameters to meet the schema restrictions, but it seems that the check is missing in case of packed arrays :-(. Thus now when you try to serialize the Poi, it writes the position with number of bits depending on the shift value 5.

But when it tries to …

Replies: 4 comments 8 replies

Comment options

You must be logged in to vote
1 reply
@Yesyoor
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Yesyoor
Comment options

Comment options

You must be logged in to vote
6 replies
@Yesyoor
Comment options

@Mi-La
Comment options

Answer selected by Yesyoor
@Mi-La
Comment options

@Yesyoor
Comment options

@Mi-La
Comment options

@Yesyoor
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants