I have problem with repeated double field in deserializing process. I want 
to read 300 messages from protobuf file, but ReadRaw got failed in last 
message (sometimes 10 before last, it depended on number of encoding type).
I've prepared little example where I am reproducing that error


Could you please say, am I doing something wrong?

$ protoc -I. --cpp_out=. ./time_series.proto
$ g++ main.cpp time_series.pb.cc -std=c++11 -L/usr/local/lib -lprotobuf 
$ ./a.out synthetic_control_TRAIN out.pb

...reading and printing all messages and on 299 message...

Can't do ReadRaw of message size 489
terminate called without an active exception

synthetic_control_TRAIN file you can get here 

If ignore bad status of ReadRaw, then repeated field of last message will 
be with almost zeros (e.g. 15e-17) in the end. Maybe it's memory leak?

my machine:

$ protoc --version
libprotoc 2.6.1

$ g++ -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 
4.8.1-10ubuntu9' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs 
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr 
--program-suffix=-4.8 --enable-shared --enable-linker-build-id 
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix 
--with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls 
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug 
--enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin 
--with-system-zlib --disable-browser-plugin --enable-java-awt=gtk 
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar 
--enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 
--with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic 
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu 
Thread model: posix
gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu9) 

$ uname -a
Linux alexeyche-Lenovo-G780 3.11.0-12-generic #19-Ubuntu SMP Wed Oct 9 
16:20:46 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to