You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Domain::registerDynamicType crash with segmentation fault when data type contain array of structure. I have tried with both XML Types and Code types producing the same failure.
Using the XML file above with project examples/C++/DDS/DynamicHelloWorldExample will produce the error but edit HelloWorldPublisher.cpp to remove any value intialization.
boolHelloWorldPublisher::init()
{
if (eprosima::fastrtps::xmlparser::XMLP_ret::XML_OK !=
eprosima::fastrtps::xmlparser::XMLProfileManager::loadXMLFile("example_type.xml"))
{
std::cout << "Cannot open XML file \"example_type.xml\". Please, run the publisher from the folder "
<< "that contatins this XML file." << std::endl;
returnfalse;
}
eprosima::fastrtps::types::DynamicType_ptr dyn_type =
eprosima::fastrtps::xmlparser::XMLProfileManager::getDynamicTypeByName("HelloWorld")->build();
TypeSupport m_type(neweprosima::fastrtps::types::DynamicPubSubType(dyn_type));
m_Hello = eprosima::fastrtps::types::DynamicDataFactory::get_instance()->create_data(dyn_type);
DomainParticipantQos pqos;
pqos.name("Participant_pub");
mp_participant = DomainParticipantFactory::get_instance()->create_participant(0, pqos);
if (mp_participant == nullptr)
{
returnfalse;
}
//REGISTER THE TYPE
m_type.get()->auto_fill_type_information(false);
m_type.get()->auto_fill_type_object(true);
m_type.register_type(mp_participant);
...
Also I have tried with creating types myself with the same error. Using examples/C++/DynamicHelloWorldExample edit in HelloWorldPublisher.cpp
Domain::registerDynamicType
crash with segmentation fault when data type contain array of structure. I have tried with both XML Types and Code types producing the same failure.Current Behavior
The type.xml file:
Steps to Reproduce
Using the XML file above with project
examples/C++/DDS/DynamicHelloWorldExample
will produce the error but editHelloWorldPublisher.cpp
to remove any value intialization.Also I have tried with creating types myself with the same error. Using
examples/C++/DynamicHelloWorldExample
edit inHelloWorldPublisher.cpp
System information
The text was updated successfully, but these errors were encountered: