Closed shelman-zl closed 1 year ago
the DomainParticipantFactory destructor is stucked too! it is similar to #3556
@shelman-zl You don't need to call eprosima::fastrtps::rtps::RTPSDomain::stopAll();
. The operations performed by that call will be automatically done by the DomainParticipantFactory destructor
@MiguelCompany Yes, I also annotation off this sentence "eprosima::fastrtps::rtps::RTPSDomain::stopAll();", but this problem still exist under windows system.
Hello, I have another problem, it is the rtps example "AsSocket": Reader init() function: HistoryAttributes hatt; hatt.payloadMaxSize = 255; mp_history = new ReaderHistory(hatt);
//CREATE READER
ReaderAttributes ratt;
ratt.endpoint.setEntityID(3);
Locator_t loc;
IPLocator::setIPv4(loc, ip);
loc.port = static_cast<uint16_t>(port);
ratt.endpoint.multicastLocatorList.push_back(loc);
mp_reader = RTPSDomain::createRTPSReader(mp_participant, ratt, mp_history, &m_listener);
mp_reader->enableMessagesFromUnkownWriters(true);
Writer init() function: //CREATE WRITERHISTORY HistoryAttributes hatt; hatt.payloadMaxSize = 255; mp_history = new WriterHistory(hatt);
//CREATE WRITER
WriterAttributes watt;
watt.endpoint.reliabilityKind = BEST_EFFORT;
mp_writer = RTPSDomain::createRTPSWriter(mp_participant, watt, mp_history);
if (mp_writer == nullptr)
{
returnfalse;
}
//ADD REMOTE READER (IN THIS CASE A READER IN THE SAME MACHINE)
ReaderProxyData ratt(4u, 1u);
ratt.guid({c_GuidPrefix_Unknown, 0x304});
Locator_t loc;
IPLocator::setIPv4(loc, ip);
loc.port = static_cast<uint16_t>(port);
ratt.add_unicast_locator(loc);
mp_writer->matched_reader_add(ratt);
please teach me, and let me know the meaning, thank you!
At 2023-06-15 13:38:12, "Miguel Company" @.***> wrote:
@shelman-zl You don't need to call eprosima::fastrtps::rtps::RTPSDomain::stopAll();. The operations performed by that call will be automatically done by the DomainParticipantFactory destructor
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
Hi @shelman-zl
In order to help you, please open one ticket for each issue. It is hard to keep track of a ticket handling several topics. Therefore, I am only going to issue the original issue. First, you should clarify your code. The snippet shared in the opening ticket mentions participant->close()
instruction. Fast DDS DomainParticipant API does not provide a close API so I do not really understand how to reproduce the issue.
You state that this issue is happening in Windows 10 Visual Studio 2019 which is an officially supported platform, but at the same time, the ticket title mentions compiler MinGW64 which is not.
Please, provide clear reproducible instructions in an officially supported platform so we can analyze the reported issue. Also, consider opening other tickets in the corresponding forums according to Fast DDS CONTRIBUTING guidelines for any other issue you are experiencing.
Hi @JLBuenoLopez-eProsima , I am sorry, I apologize for not describing it clearly. I have encountered this problem with the Fast-DDS library compiled with MinGW64 compiler on the Windows system, I create the participant and register the topic, this program can exchange the message data between publisher and subcriber. but when program quit, it is stucked in DomainParticipantFactory destructor function, even though I don't call eprosima::fastrtps::rtps::RTPSDomain::stopAll(); in my code.
@JLBuenoLopez-eProsima If necessary, I can send you my program code with e-mail.
Hi @shelman-zl,
Following @JLBuenoLopez-eProsima and in accordance with our CONTRIBUTING.md guidelines, the MinGW compiler is not an officially supported, so I am moving this issue to the corresponding discussion forum.
Is there an already existing issue for this?
Expected behavior
the test program can exit normally.
Current behavior
the test program just lock after return 0, I debug found is the DomainParticipantFactory instance deallocated function is not be called and executed.
Steps to reproduce
this is my test program: int main(int argc, char* argv) { eprosima::fastdds::dds::DomainParticipant participant = eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->create_participant(1, eprosima::fastdds::dds::PARTICIPANT_QOS_DEFAULT); if (participant) { participant->close(); eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->delete_participant(participant); }
}
Fast DDS version/commit
2.10.1 and master branch
Platform/Architecture
Windows 10 Visual Studio 2019, Other. Please specify in Additional context section.
Transport layer
UDPv4
Additional context
this problem also occurs under Mingw64 environment.
XML configuration file
No response
Relevant log output
No response
Network traffic capture
No response