==12975== Invalid read of size 4 ==12975== at 0x4BF2D9C: fit::Mesg::Mesg(fit::Mesg const&) (fit_mesg.cpp:36) ==12975== by 0x4B6205F: fit::FieldDescriptionMesg::FieldDescriptionMesg(fit::FieldDescriptionMesg const&) (fit_field_description_mesg.hpp:26) ==12975== by 0x4BF26E7: fit::DeveloperFieldDefinition::DeveloperFieldDefinition(fit::DeveloperFieldDefinition const&) (fit_developer_field_definition.cpp:43) ==12975== by 0x4BF330F: fit::Mesg::Write(std::ostream&, fit::MesgDefinition const*) const (fit_mesg.cpp:126) ==12975== by 0x4C7B4DB: fit::Encode::Write(fit::Mesg const&) (fit_encode.cpp:64) ==12975== by 0x135F87: fit_writer_add_deviceinfo_msg(fit_context&, _SensorDeviceEvent const&) (fit_writer.cpp:713) ==12975== by 0x14136F: fit_writer_handle_message(unsigned char, void*, unsigned int, unsigned short) (fit_writer.cpp:2751) ==12975== by 0x156B97: event_processor_run() (event_processor.cpp:715) ==12975== by 0x1523BB: main (main.cpp:20) ==12975== Address 0x7878170 is 0 bytes inside a block of size 32 free'd ==12975== at 0x484966C: operator delete(void*) (vg_replace_malloc.c:576) ==12975== by 0x4BF29BB: fit::DeveloperFieldDefinition::~DeveloperFieldDefinition() (fit_developer_field_definition.cpp:80) ==12975== by 0x16512B: void std::_Destroy(fit::DeveloperFieldDefinition*) (stl_construct.h:98) ==12975== by 0x164CEF: void std::_Destroy_aux::__destroy(fit::DeveloperFieldDefinition*, fit::DeveloperFieldDefinition*) (stl_construct.h:108) ==12975== by 0x164943: void std::_Destroy(fit::DeveloperFieldDefinition*, fit::DeveloperFieldDefinition*) (stl_construct.h:137) ==12975== by 0x16458F: void std::_Destroy(fit::DeveloperFieldDefinition*, fit::DeveloperFieldDefinition*, std::allocator >::~vector() (stl_vector.h:434) ==12975== by 0x163FF7: fit::MesgDefinition::~MesgDefinition() (fit_mesg_definition.hpp:31) ==12975== by 0x4C7B503: fit::Encode::Write(fit::Mesg const&) (fit_encode.cpp:64) ==12975== by 0x135F87: fit_writer_add_deviceinfo_msg(fit_context&, _SensorDeviceEvent const&) (fit_writer.cpp:713) ==12975== by 0x14136F: fit_writer_handle_message(unsigned char, void*, unsigned int, unsigned short) (fit_writer.cpp:2751) ==12975== by 0x156B97: event_processor_run() (event_processor.cpp:715) ==12975== Block was alloc'd at ==12975== at 0x48481B4: operator new(unsigned int) (vg_replace_malloc.c:328) ==12975== by 0x4BF26CB: fit::DeveloperFieldDefinition::DeveloperFieldDefinition(fit::DeveloperFieldDefinition const&) (fit_developer_field_definition.cpp:43) ==12975== by 0x4B619BB: void std::_Construct(fit::DeveloperFieldDefinition*, fit::DeveloperFieldDefinition const&) (stl_construct.h) ==12975== by 0x4B61807: fit::DeveloperFieldDefinition* std::__uninitialized_copy::__uninit_copy(fit::DeveloperFieldDefiniti) ==12975== by 0x4B616A7: fit::DeveloperFieldDefinition* std::uninitialized_copy(fit::DeveloperFieldDefinition const*, fit::Develope) ==12975== by 0x4B61363: fit::DeveloperFieldDefinition* std::__uninitialized_copy_a(fit::DeveloperFi) ==12975== by 0x4B60EE3: fit::DeveloperFieldDefinition* std::__uninitialized_move_if_noexcept_a >::_M_realloc_insert(__gnu_cxx::__normal_iterator >::emplace_back(fit::DeveloperFieldDefinition&&) (v) ==12975== by 0x4B5F40B: std::vector >::push_back(fit::DeveloperFieldDefinition&&) (stl_vector.h:954) ==12975== by 0x4B5E437: fit::MesgDefinition::MesgDefinition(fit::Mesg const&) (fit_mesg_definition.cpp:42) ==12975== by 0x4C7B3E3: fit::Encode::Write(fit::Mesg const&) (fit_encode.cpp:53)