Hey Team,
I have been trying to add unit-test for my protobuf class. Attaching the
full error as pdf.
[3 / 3] Leaked 72 bytes allocated at 000002E2A001AAC0
at Mso::Memory::AllocateEx
[liblet\debugheap\memoryapiimpl\memoryapi.cpp(19)]
at Mso::Memory::Throw::AllocateEx
[x64\debug\liblet_operatornew\x-none\x64\inc\core\memoryApi_throw.h(29)]
at operator new
[x64\debug\liblet_precomp\x-none\x64\inc\core\memoryNew_Throw.h(61)]
at
google::protobuf::Arena::CreateInternal<TelemetryProtobuf::EventNamespace>
[x64\debug\telemetry_serializersink\x-none\x64\inc\google\protobuf\arena.h(527)]
at
google::protobuf::Arena::CreateMaybeMessage<TelemetryProtobuf::EventNamespace>
[telemetry\serializersink\telemetryevent_v310.pb.cc(12052)]
at
google::protobuf::MessageLite::CreateMaybeMessage<TelemetryProtobuf::EventNamespace>
[x64\debug\telemetry_serializersink\x-none\x64\inc\google\protobuf\message_lite.h(449)]
I am just populating the protobuf event.
void PopulateEventNameSpace(TelemetryProtobuf::EventNamespace&
protobufEventNamespace, const Telemetry::TelemetryNamespace&
telemetryNamespace) noexcept
{
protobufEventNamespace.set_fullnamelength(8);
protobufEventNamespace.set_nodenamecount(1010);
}
void PopulateEventName(TelemetryProtobuf::EventName& protobufEventName,
const Telemetry::EventName& telemetryEventName) noexcept
{
protobufEventName.set_eventnodename("baz");
PopulateEventNameSpace(*protobufEventName.mutable_eventnamespace(),
telemetryEventName.GetNamespace());
}
Anything I am missing here? I am using the protobuf version 3.10
Thanks,
Harsh
--
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/62bcf271-5068-42ca-b38a-4264f0be0a10n%40googlegroups.com.
Message: 2 of 10 tests failed.
ProtobufSerializerTest.TestClassTeardown
FAIL:
3 leaks
[1 / 3] Leaked 40 bytes allocated at 00000220AD028800
at Mso::Memory::AllocateEx
[liblet\debugheap\memoryapiimpl\memoryapi.cpp(19)]
at Mso::Memory::Throw::AllocateEx
[x64\debug\liblet_operatornew\x-none\x64\inc\core\memoryApi_throw.h(29)]
at operator new
[x64\debug\liblet_precomp\x-none\x64\inc\core\memoryNew_Throw.h(61)]
at google::protobuf::Arena::CreateInternal<TelemetryProtobuf::EventName>
[x64\debug\telemetry_serializersink\x-none\x64\inc\google\protobuf\arena.h(527)]
at
google::protobuf::Arena::CreateMaybeMessage<TelemetryProtobuf::EventName>
[telemetry\serializersink\telemetryevent_v310.pb.cc(12056)]
at
google::protobuf::MessageLite::CreateMaybeMessage<TelemetryProtobuf::EventName>
[x64\debug\telemetry_serializersink\x-none\x64\inc\google\protobuf\message_lite.h(449)]
at TelemetryProtobuf::TelemetryEvent::_internal_mutable_eventname
[telemetry\serializersink\TelemetryEvent_v310.pb.h(12571)]
at TelemetryProtobuf::TelemetryEvent::mutable_eventname
[telemetry\serializersink\TelemetryEvent_v310.pb.h(12579)]
at Mso::Telemetry::SerializerSink::PopulateProtobufEvent
[telemetry\serializersink\protobufserializer.cpp(17)]
at Mso::Telemetry::SerializerSink::ProtobufSerializer::Serialize
[telemetry\serializersink\protobufserializer.cpp(40)]
at ProtobufSerializerTest::Serialize_TelemetryEvent_ReturnString
[telemetry\serializersink\test\protobufserializertests.cpp(21)]
at RunnableMotifTest::Run
[x64\debug\motifcpp\x-none\x64\inc\MotifCpp\RunnableMotifTest.h(45)]
at RunnableMotifTest::RunTest
[x64\debug\motifcpp\x-none\x64\inc\MotifCpp\RunnableMotifTest.h(81)]
at UnitTestRunner::RunTest
[x64\debug\motifcpp\x-none\x64\inc\MotifCpp\UnitTestRunner.h(22)]
at UnitTestCollection::TestActionRunTest
[motifcpp\lib\unittestcollection.cpp(24)]
at `UnitTestCollection::TryInvokeTestAction'::`2'::<lambda_1>::operator()
[motifcpp\lib\unittestcollection.cpp(60)]
at
Motif::ActionRunner::RunWithStructuredExceptionHandling<`UnitTestCollection::TryInvokeTestAction'::`2'::<lambda_1>
> [x64\debug\motifcpp\x-none\x64\inc\MotifCpp\Motif\ActionRunner.h(97)]
at
Motif::ActionRunner::RunWithCPPExceptionHandling<`UnitTestCollection::TryInvokeTestAction'::`2'::<lambda_1>
> [x64\debug\motifcpp\x-none\x64\inc\MotifCpp\Motif\ActionRunner.h(68)]
at
Motif::ActionRunner::Run<`UnitTestCollection::TryInvokeTestAction'::`2'::<lambda_1>
> [x64\debug\motifcpp\x-none\x64\inc\MotifCpp\Motif\ActionRunner.h(46)]
at UnitTestCollection::TryInvokeTestAction
[motifcpp\lib\unittestcollection.cpp(61)]
at UnitTestCollection::RunTestAction
[motifcpp\lib\unittestcollection.cpp(40)]
at UnitTestCollection::RunUnitTestMethodImplementation
[motifcpp\lib\unittestcollection.cpp(229)]
at UnitTestCollection::RunUnitTestMethod
[motifcpp\lib\unittestcollection.cpp(378)]
at UnitTestApiRunTestMethodBody [motifcpp\lib\motifcpptest.cpp(36)]
at unknown
OAUTOBUGTAG:CLS[DEBUGHEAP_LEAK][3][][][]ENDOABT
[2 / 3] Leaked 40 bytes allocated at 00000220AD028280
at Mso::Memory::AllocateEx
[liblet\debugheap\memoryapiimpl\memoryapi.cpp(19)]
at Mso::Memory::Throw::AllocateEx
[x64\debug\liblet_operatornew\x-none\x64\inc\core\memoryApi_throw.h(29)]
at operator new [liblet\operatornew\msomemorythrow\msomemorythrow.cpp(16)]
at google::protobuf::internal::ArenaStringPtr::SetNoArena
[opensource\protobuf\src\google\protobuf\arenastring.h(277)]
at TelemetryProtobuf::EventName::set_eventnodename
[telemetry\serializersink\TelemetryEvent_v310.pb.h(9777)]
at Mso::Telemetry::SerializerSink::PopulateEventName
[telemetry\serializersink\protobufpopulatehelper.cpp(193)]
at Mso::Telemetry::SerializerSink::PopulateProtobufEvent
[telemetry\serializersink\protobufserializer.cpp(31)]
at Mso::Telemetry::SerializerSink::ProtobufSerializer::Serialize
[telemetry\serializersink\protobufserializer.cpp(40)]
at ProtobufSerializerTest::Serialize_TelemetryEvent_ReturnString
[telemetry\serializersink\test\protobufserializertests.cpp(21)]
at RunnableMotifTest::Run
[x64\debug\motifcpp\x-none\x64\inc\MotifCpp\RunnableMotifTest.h(45)]
at RunnableMotifTest::RunTest
[x64\debug\motifcpp\x-none\x64\inc\MotifCpp\RunnableMotifTest.h(81)]
at UnitTestRunner::RunTest
[x64\debug\motifcpp\x-none\x64\inc\MotifCpp\UnitTestRunner.h(22)]
at UnitTestCollection::TestActionRunTest
[motifcpp\lib\unittestcollection.cpp(24)]
at `UnitTestCollection::TryInvokeTestAction'::`2'::<lambda_1>::operator()
[motifcpp\lib\unittestcollection.cpp(60)]
at
Motif::ActionRunner::RunWithStructuredExceptionHandling<`UnitTestCollection::TryInvokeTestAction'::`2'::<lambda_1>
> [x64\debug\motifcpp\x-none\x64\inc\MotifCpp\Motif\ActionRunner.h(97)]
at
Motif::ActionRunner::RunWithCPPExceptionHandling<`UnitTestCollection::TryInvokeTestAction'::`2'::<lambda_1>
> [x64\debug\motifcpp\x-none\x64\inc\MotifCpp\Motif\ActionRunner.h(68)]
at
Motif::ActionRunner::Run<`UnitTestCollection::TryInvokeTestAction'::`2'::<lambda_1>
> [x64\debug\motifcpp\x-none\x64\inc\MotifCpp\Motif\ActionRunner.h(46)]
at UnitTestCollection::TryInvokeTestAction
[motifcpp\lib\unittestcollection.cpp(61)]
at UnitTestCollection::RunTestAction
[motifcpp\lib\unittestcollection.cpp(40)]
at UnitTestCollection::RunUnitTestMethodImplementation
[motifcpp\lib\unittestcollection.cpp(229)]
at UnitTestCollection::RunUnitTestMethod
[motifcpp\lib\unittestcollection.cpp(378)]
at UnitTestApiRunTestMethodBody [motifcpp\lib\motifcpptest.cpp(36)]
at unknown
[3 / 3] Leaked 72 bytes allocated at 00000220AD071420
at Mso::Memory::AllocateEx
[liblet\debugheap\memoryapiimpl\memoryapi.cpp(19)]
at Mso::Memory::Throw::AllocateEx
[x64\debug\liblet_operatornew\x-none\x64\inc\core\memoryApi_throw.h(29)]
at operator new
[x64\debug\liblet_precomp\x-none\x64\inc\core\memoryNew_Throw.h(61)]
at
google::protobuf::Arena::CreateInternal<TelemetryProtobuf::EventNamespace>
[x64\debug\telemetry_serializersink\x-none\x64\inc\google\protobuf\arena.h(527)]
at
google::protobuf::Arena::CreateMaybeMessage<TelemetryProtobuf::EventNamespace>
[telemetry\serializersink\telemetryevent_v310.pb.cc(12052)]
at
google::protobuf::MessageLite::CreateMaybeMessage<TelemetryProtobuf::EventNamespace>
[x64\debug\telemetry_serializersink\x-none\x64\inc\google\protobuf\message_lite.h(449)]
at TelemetryProtobuf::EventName::_internal_mutable_eventnamespace
[telemetry\serializersink\TelemetryEvent_v310.pb.h(9717)]
at TelemetryProtobuf::EventName::mutable_eventnamespace
[telemetry\serializersink\TelemetryEvent_v310.pb.h(9725)]
at Mso::Telemetry::SerializerSink::PopulateEventName
[telemetry\serializersink\protobufpopulatehelper.cpp(193)]
at Mso::Telemetry::SerializerSink::PopulateProtobufEvent
[telemetry\serializersink\protobufserializer.cpp(31)]
at Mso::Telemetry::SerializerSink::ProtobufSerializer::Serialize
[telemetry\serializersink\protobufserializer.cpp(40)]
at ProtobufSerializerTest::Serialize_TelemetryEvent_ReturnString
[telemetry\serializersink\test\protobufserializertests.cpp(21)]
at RunnableMotifTest::Run
[x64\debug\motifcpp\x-none\x64\inc\MotifCpp\RunnableMotifTest.h(45)]
at RunnableMotifTest::RunTest
[x64\debug\motifcpp\x-none\x64\inc\MotifCpp\RunnableMotifTest.h(81)]
at UnitTestRunner::RunTest
[x64\debug\motifcpp\x-none\x64\inc\MotifCpp\UnitTestRunner.h(22)]
at UnitTestCollection::TestActionRunTest
[motifcpp\lib\unittestcollection.cpp(24)]
at `UnitTestCollection::TryInvokeTestAction'::`2'::<lambda_1>::operator()
[motifcpp\lib\unittestcollection.cpp(60)]
at
Motif::ActionRunner::RunWithStructuredExceptionHandling<`UnitTestCollection::TryInvokeTestAction'::`2'::<lambda_1>
> [x64\debug\motifcpp\x-none\x64\inc\MotifCpp\Motif\ActionRunner.h(97)]
at
Motif::ActionRunner::RunWithCPPExceptionHandling<`UnitTestCollection::TryInvokeTestAction'::`2'::<lambda_1>
> [x64\debug\motifcpp\x-none\x64\inc\MotifCpp\Motif\ActionRunner.h(68)]
at
Motif::ActionRunner::Run<`UnitTestCollection::TryInvokeTestAction'::`2'::<lambda_1>
> [x64\debug\motifcpp\x-none\x64\inc\MotifCpp\Motif\ActionRunner.h(46)]
at UnitTestCollection::TryInvokeTestAction
[motifcpp\lib\unittestcollection.cpp(61)]
at UnitTestCollection::RunTestAction
[motifcpp\lib\unittestcollection.cpp(40)]
at UnitTestCollection::RunUnitTestMethodImplementation
[motifcpp\lib\unittestcollection.cpp(229)]
at UnitTestCollection::RunUnitTestMethod
[motifcpp\lib\unittestcollection.cpp(378)]
at UnitTestApiRunTestMethodBody [motifcpp\lib\motifcpptest.cpp(36)]
at unknown
Total Leak Size: 152
ProtobufSerializerTest.Serialize_TelemetryEvent_ReturnString
FAIL: Structured exception occurred [Access Violation].