Status: New
Labels: Type-Defect Priority-Medium

New issue 593 by FatalException on calling SerializeAsString()

Protobuf 2.5.0
Ubuntu 12.04 LTS

Protobuf randomly throws a FatalException on calling SerializeAsString() with this output: [libprotobuf FATAL google/protobuf/] CHECK failed: !coded_out.HadError(): terminate called after throwing an instance of 'google::protobuf::FatalException'
  what(): CHECK failed: !coded_out.HadError()

This happens on every 10th or 100th call of SerializeAsString().

This is the source code in which the SerializeAsString is called:

QByteArray ProtobufSerializer::serialize(AbstractTransferable* transferable) throw(NexusDataLinkException) {
    ProtoEnvelop envelop;
    ProtoPayloadWrapper* wrapper = envelop.add_payloadwrapper();

    ChannelResponse* response = static_cast<ChannelResponse*>(transferable);
ProtoResponse* allocatedProtoResponse(wrapper->mutable_channelresponse()); populateProtoResponse(response, allocatedProtoResponse, transferable->getDataContainer());


    // convert to byte array
    std::string dataString = envelop.SerializeAsString();
QByteArray data = QByteArray(, dataString.size()); // makes a deep copy of the data contained in dataString

    return data;

What could be the cause of this error? I could not find anything similar on google & Co.

Kind regards,

You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:

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 post to this group, send email to
Visit this group at
For more options, visit

Reply via email to