Error: Invalid wire_type

323 views
Skip to first unread message

marwa...@gmail.com

unread,
May 21, 2014, 4:34:19 AM5/21/14
to nan...@googlegroups.com
Hello,
 
I have an error when I try to encode/decode many messages received from an UDP connexion. This error says me "Error: Invalid wire_type".
 
Could somone explain me what does this error means?
 
 

Petteri Aimonen

unread,
May 21, 2014, 4:37:38 AM5/21/14
to nan...@googlegroups.com
Hi,

> I have an error when I try to encode/decode many messages received from an
> UDP connexion. This error says me "Error: Invalid wire_type".
> Could somone explain me what does this error means?

Corrupted data.

If you can print out the binary data using e.g. a debugger, I can take a
look at it.

--
Petteri

marwa...@gmail.com

unread,
May 21, 2014, 5:52:41 AM5/21/14
to nan...@googlegroups.com
Thank you for you help.
 
What do you mean exactly by "binary data"?
 

Petteri Aimonen

unread,
May 21, 2014, 6:14:56 AM5/21/14
to nan...@googlegroups.com
Hi,

> What do you mean exactly by "binary data"?

The input data that you are passing to pb_decode().

--
Petteri

marwa...@gmail.com

unread,
May 21, 2014, 6:45:48 AM5/21/14
to nan...@googlegroups.com
Ok.
 
The binary data is:
 
"\b\001\020\005\"\261\001\n\241\001Z&Fa\272A\203\214\341\252\331\324\333\\\351\211G\210\177\216\300\067\273\312\350\064\314Cy\222A\317k\202h\213<\n\257{mw\314B.&8\250Al\344\363t\231\231\003\017\261\t\364\062\367\016\335\336mS\350\223\347K\351\230\061\062\204\323\270\346\335o\305B\276\263\336\205K\377\234\265\233\250\345\362,B\213\070\350\016\212\300\251\304\225\025\377D\006\215\342\235{-\243\255)\300.\271\317\006VL\354\364\000\326\304\314\363\006\261\231V\310\355|\335z\333\363N\327\233\214\216p\217\345;\363\210\346L\337la\222\215\020\241\001\030\000 \001(\000\060\000\070\001\062\064\n\036\214\213\236\222\005\214\213\236\222\005\214\213\236\222\005\214"

Petteri Aimonen

unread,
May 21, 2014, 6:57:55 AM5/21/14
to nan...@googlegroups.com
Hi,

> The binary data is:

Even protoc --decode_raw fails to parse this. At 184th byte, there is a
tag with type "End group", which is deprecated and cannot occur at this
position anyway.

I suggest to compare it with the data that you get from the encode
function at the other end to see if there is some corruption in the
transfer.

--
Petteri
Reply all
Reply to author
Forward
0 new messages