Jens F. Prinz-Sander, Were you able to solve this ? I am also getting the same error and need help in fixing this.
Thanks, Kiran On Thursday, September 20, 2018 at 1:34:34 AM UTC-7, Jens F. Prinz-Sander wrote: > > Hi, > > I am struggling with the MessageDifferencer of protobuf (version 3). I was > hoping to use the StreamReporter::ReportModified(const Message & > message1, const Message & message2, const std::vector< SpecificField > & > field_path) to get the modified fields filled into the field_path vector. > So I could just focus on those differences. > > However, when I run the following code, I get a segmentation fault. I am > not sure yet why that is. > > > > string diff_report; > MessageDifferencer md; > md.set_report_matches(false); > md.set_report_moves(false); > md.set_scope(MessageDifferencer::FULL); > md.ReportDifferencesToString(&diff_report); > bool diff = md.Compare(msgIn01, msgIn02); > cout << "diff : " << boolalpha << diff << endl; > cout << "diff : " << diff_report << endl; > > string reporterString; > google::protobuf::io::StringOutputStream sos(&reporterString); > MessageDifferencer::StreamReporter reporter(&sos); > std::vector< MessageDifferencer::SpecificField > field_path; > md.ReportDifferencesTo(&reporter); > reporter.ReportMatched(msgIn01, msgIn02, field_path); > > > The output I get is showing this : > > > diff : false > diff : modified: msg.send.settings.Scan.Frames[0].txFstop: 0.5 -> 2.5 > > > Program received signal SIGSEGV, Segmentation fault. > > > > > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/b33fbb80-f48f-4678-a240-b22fdcd10e95%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
