Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fastddsspy with idl type #52

Closed
wannastar opened this issue Sep 1, 2023 · 3 comments
Closed

fastddsspy with idl type #52

wannastar opened this issue Sep 1, 2023 · 3 comments

Comments

@wannastar
Copy link

image

IDL include a structure HelloWorld, HelloWorld includes a struct point, point includes a struct timestamp(such as HelloWorld.idl),in this way, fastddsspy will come to Segmentation fault. However, if IDL include a structure HelloWorld, HelloWorld includes a struct point, point don't include any struc (like HelloWorld_OK.idl), fastddsspy will run ok.

HelloWorld_OK.idl
struct point{
short x;};
struct HelloWorld{
point pos;
unsigned long index;};

HelloWorld.idl
struct timestamp{
short h;};
struct point{
timestamp ts;
short x;};
struct HelloWorld{
point pos;
unsigned long index;};

step1:
fastddsgen -typeobjcet HelloWorld.idl

step2:
DomainParticipantQos pqos;
pqos.wire_protocol().builtin.typelookup_config.use_server = true;

eprosima::fastdds::dds::DomainParticipant* participant_;
participant_ = DomainParticipantFactory::get_instance()->create_participant(0, pqos);

eprosima::fastdds::dds::TypeSupport type_;
type_(new HelloWorldPubSubType())
type_.register_type(participant_);
type_->auto_fill_type_object(false);
type_->auto_fill_type_information(true);

step3:
HelloWorld hello_;
hello_.index(0);
hello_.pos().ts().h(10);
hello_.pos().x(10);
writer_->write(&hello_);

@wannastar
Copy link
Author

it's same with this .
publisher: TypeLookupService -x complete
fastddsspy will come to Segmentation fault again.

@juanlofer-eprosima
Copy link
Contributor

juanlofer-eprosima commented Sep 4, 2023

Hi @wannastar

What you are describing is one of the known issues with Dynamic Types currently present in master branch.
An exhaustive refactor tackling all these issues and aiming to fully comply with the OMG standard is currently being performed, and it is expected to be completed in the upcoming months.

For the time being, there exists an unsupported branch containing a bunch of temporary workarounds which probably would solve your issue.

@wannastar
Copy link
Author

okay, i got it. i'm looking forward to a better fastdds tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants