g3force / ssl-autonomous-refbox

Automatically exported from code.google.com/p/ssl-autonomous-refbox
0 stars 0 forks source link

libprotobuf causes an error when saving a record because of invalid UTF-8 data #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1. Click record
2. Click stop record
3. see console

Following error will appear very frequently:

{{{
libprotobuf ERROR google/protobuf/wire_format.cc:1012] Encountered string 
containing invalid UTF-8 data while serializing protocol buffer. Strings must 
contain only UTF-8; use the 'bytes' type for raw bytes.
}}}

Original issue reported on code.google.com by nicolai....@gmail.com on 5 May 2012 at 10:51

GoogleCodeExporter commented 9 years ago
refbox_cmd was saved as string in ascii, but protobuf did not like it.
Changed string to bytes as recommended by error message:

import "messages_robocup_ssl_detection.proto";

message Log_Frame
{
    required SSL_DetectionFrame frame = 1;
    required bytes refbox_cmd = 2; // <-- had type string before
}

message Refbox_Log
{
    repeated Log_Frame log = 1;
}

Original comment by nicolai....@gmail.com on 16 May 2012 at 8:04