Hello,
I am migrating from Fast-DDS 2.14.3 & Fast-DDS-Gen 3.3.1 to Fast-DDS 3.2.1 & Fast-DDS-Gen 4.1.0. I discovered that all my message types that contain multidimensional sequences of structs will throw a Inconsistency between given header and element_identifier parameters exception when register_type is called.
The issue only occurs if the multidimensional sequence does hold custom structs. In the following example, registering DummyA will work, registering DummyB will raise an exception:
Dummy.idl
struct Point2D
{
double x;
double y;
};
struct DummyA
{
sequence< sequence< double > > points;
};
struct DummyB
{
sequence< sequence< Point2D> > points;
};
This is my test code:
main.cpp
#include <fastdds/dds/topic/TypeSupport.hpp>
#include <fastdds/dds/domain/DomainParticipant.hpp>
#include <fastdds/dds/domain/DomainParticipantFactory.hpp>
#include "DummyPubSubTypes.hpp"
#include <iostream>
int main(int argc, char** argv)
{
auto factory = eprosima::fastdds::dds::DomainParticipantFactory::get_instance();
auto participant = factory->create_participant_with_default_profile(nullptr, eprosima::fastdds::dds::StatusMask::none());
if (participant == nullptr)
{
std::cerr << "Failed to create participant" << std::endl;
return -1;
}
eprosima::fastdds::dds::TypeSupport typeA(new DummyAPubSubType());
eprosima::fastdds::dds::TypeSupport typeB(new DummyBPubSubType());
try
{
typeA.register_type(participant);
std::cout << "Msg type a registered" << std::endl;
typeB.register_type(participant);
std::cout << "Msg type b registered" << std::endl;
}
catch (const std::exception& e)
{
std::cerr << "Failed to register type: " << e.what() << std::endl;
return -2;
}
return 0;
}
The output log shows that the multidimensional double sequence worked, but the multidimensional Point2D sequence does not:
Msg type a registered
Failed to register type: Inconsistency between given header and element_identifier parameters
Hello,
I am migrating from Fast-DDS 2.14.3 & Fast-DDS-Gen 3.3.1 to Fast-DDS 3.2.1 & Fast-DDS-Gen 4.1.0. I discovered that all my message types that contain multidimensional sequences of structs will throw a
Inconsistency between given header and element_identifier parametersexception when register_type is called.The issue only occurs if the multidimensional sequence does hold custom structs. In the following example, registering DummyA will work, registering DummyB will raise an exception:
Dummy.idl
This is my test code:
main.cpp
The output log shows that the multidimensional double sequence worked, but the multidimensional Point2D sequence does not: