I just observed the same and by following the workaround (changing bool->int) solved it but...
Do we always have to do that or protobuf library has a fix for this? If so which version? " at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 56 return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig); (gdb) where #0 0x0000003f2f234ff9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #1 0x0000003f2f238068 in __GI_abort () at abort.c:89 #2 0x00007ffff2f325b5 in _gnu_cxx::_verbose_terminate_handler () at /data/users/test/workspace/daily/poky/build/tmp/work-shared/gcc-4.8.2-r0/gcc-4.8.2/libstdc+-v3/libsupc+/vterminate.cc:95 #3 0x00007ffff2f30726 in _cxxabiv1::_terminate (handler=<optimized out>) at /data/users/test/workspace/daily/poky/build/tmp/work-shared/gcc-4.8.2-r0/gcc-4.8.2/libstdc+-v3/libsupc+/eh_terminate.cc:38 #4 0x00007ffff2f30753 in std::terminate () at /data/users/test/workspace/daily/poky/build/tmp/work-shared/gcc-4.8.2-r0/gcc-4.8.2/libstdc+-v3/libsupc+/eh_terminate.cc:48 #5 0x00007ffff2f3097e in _cxxabiv1::_cxa_throw (obj=0x7fffdc028600, tinfo=<optimized out>, dest=<optimized out>) at /data/users/test/workspace/daily/poky/build/tmp/work-shared/gcc-4.8.2-r0/gcc-4.8.2/libstdc+-v3/libsupc+/eh_throw.cc:84 #6 0x00007ffff70ba618 in google::protobuf::internal::LogMessage::Finish ( this=0x7fffeca9b8f0) at google/protobuf/stubs/common.cc:195 #7 0x00007ffff70ba648 in google::protobuf::internal::LogFinisher::operator= ( this=this@entry=0x7fffeca9b8af, other=...) at google/protobuf/stubs/common.cc:203 #8 0x00007ffff70ce0da in google::protobuf::MessageLite::SerializeWithCachedSizesToArray (this=<optimized out>, target=0x7fffdc027c18 "\n\020\b") --Type <return> to continue, or q <return> to quit-- at google/protobuf/message_lite.cc:224 #9 0x00007ffff70cdb91 in google::protobuf::MessageLite::AppendPartialToString (this=this@entry=0x7fffeca9ba30, output=output@entry=0x7fffeca9ba20) at google/protobuf/message_lite.cc:283 #10 0x00007ffff70cdbf5 in google::protobuf::MessageLite::AppendToString ( this=this@entry=0x7fffeca9ba30, output=output@entry=0x7fffeca9ba20) at google/protobuf/message_lite.cc:274 #11 0x00007ffff70cdd40 in google::protobuf::MessageLite::SerializeToString ( this=this@entry=0x7fffeca9ba30, output=output@entry=0x7fffeca9ba20) at google/protobuf/message_lite.cc:292" " On Wednesday, July 2, 2014 at 5:54:05 PM UTC-5, [email protected] wrote: > > > Comment #4 on issue 593 by [email protected]: FatalException on calling > > SerializeAsString() > http://code.google.com/p/protobuf/issues/detail?id=593 > > > This exact same issue occurs for me too - and when I replace the usage of > > all bools with uint32s, the problem goes away. > > Looking through the source code, it seems that the only way in which the > _has_error flag can be set is if _Next returns false. The check that dies > > is in message_lite.cc:224, and from a cursor examination the only code > path > that would cause the error is if the return value of GetCachedSize() is > insufficient to serialise the message. > > The reason this happens with bools is that a bool is always considered to > > be one byte, but if your bool value is unitialised (as mine was) then when > > protobuf actually tries to serialise the value it may end up using more > than one byte. > > IMHO protobuf should assert if you try to set a value other than 0 or 1 > into a bool. This would catch the error where it actually occurs, rather > than later on when it attempts to serialise the data. > > -- > You received this message because this project is configured to send all > issue notifications to this address. > You may adjust your notification preferences at: > https://code.google.com/hosting/settings > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
