Sorry forgot to add this information, g++ complier and protoc version I am
using
[tsutton@ssa-syr-g1x-dev01 simple_proto]$ g++ --version
g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[tsutton@ssa-syr-g1x-dev01 simple_proto]$ protoc --version
libprotoc 3.21.5
On Wednesday, August 31, 2022 at 11:36:44 AM UTC-4 Timothy Sutton wrote:
> I am getting a sigabrt when my deconstructor is being called. I have a
> fairly proto file. Which is below highlighted in yellow (sorry I cant do
> attachments). I did a simple main to create my Data and then assign a
> heartbeat, and then try to unassign the heartbeat and this creates a
> SIGABRT with _int_free() issue. My quick main application is highlighted in
> red below.
>
>
>
>
> syntax = "proto3";
> package common;
>
> option java_package = "com.corporate";
> option java_multiple_files = true;
>
> enum Kind {
> COMMON = 0;
> }
>
> message Data { //header.kind == "COMMON"
> oneof content {
> Heartbeat heartbeat = 1;
> Acknowledge acknowledge = 2;
> DataUpdateRequest dataupdateRequest = 3;
> }
> }
>
> message Heartbeat {
> }
>
> message Acknowledge {
> uint64 counter = 1; //counter from originating message
> AcknowledgeKind kind = 2;
> }
>
> message DataUpdateRequest {
> }
>
> enum AcknowledgeKind {
> ACKNOWLEDGE_OK = 0; //the originating messages has been accepted
> ACKNOWLEDGE_ERROR = 1; //processing error during processing of message
> ACKNOWLEDGE_ERROR_NOT_IMPLEMENTED = 2; //the processing of the
> originating messages is not implemented
> ACKNOWLEDGE_ERROR_NOT_FOUND = 3; //the processing of the originating
> message could not be performed, the referenced object was not found
> }
>
>
>
> #include <iostream>
> using namespace std;
>
> #include "src/main/cpp/proto_api/common/data.pb.h"
> int main(int argc, char **argv) {
> // Simple example of destructor failure
> while(true){
> common::Data data;
> common::Heartbeat heartbeat;
> data.set_allocated_heartbeat(&heartbeat);
> cerr << "Created data and heartbeat" << endl;
> try {
> data.clear_heartbeat();
> } catch (const std::exception& e)
> {
> cerr << " Exception " << e.what() << endl;
> }
>
> }
> return 0;
> }
>
>
>
>
>
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/protobuf/617929f5-6954-44d3-bfa6-c9d3701fc751n%40googlegroups.com.