[14362] TypeLookupSubsriber Segmentation fault
Is there an already existing issue for this?
- [X] I have searched the existing issues
Expected behavior
@bit_bound(8)
bitmask MyBitMask
{
@position(0) flag0,
@position(1) flag1,
@position(4) flag4,
@position(6) flag6,
flag7
};
struct HelloWorldTopic
{
// @Key BoxType id;
MyBitMask id;
unsigned long index;
string message;
string test;
world hello;
};
publisher this idl,the typelookup Segmentation fault
Current behavior
eprosima::fastrtps::types::TypeIdentifier::operator=(eprosima::fastrtps::types::TypeIdentifier const&) [clone .localalias.55] 0x00007ffff7537131
eprosima::fastrtps::types::TypeObjectFactory::fill_complete_information(eprosima::fastrtps::types::TypeInformation*, eprosima::fastrtps::types::TypeIdentifier const*) const 0x00007ffff7561430
eprosima::fastrtps::types::TypeObjectFactory::fill_complete_dependant_types(eprosima::fastrtps::types::TypeInformation*, eprosima::fastrtps::types::TypeIdentifier const*) const 0x00007ffff75624ed
eprosima::fastrtps::types::TypeObjectFactory::fill_complete_information(eprosima::fastrtps::types::TypeInformation*, eprosima::fastrtps::types::TypeIdentifier const*) const 0x00007ffff7561ab9
eprosima::fastrtps::types::TypeObjectFactory::get_type_information(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const 0x00007ffff75621e4
eprosima::fastrtps::rtps::EDP::newLocalReaderProxyData(eprosima::fastrtps::rtps::RTPSReader*, eprosima::fastrtps::TopicAttributes const&, eprosima::fastdds::dds::ReaderQos const&, eprosima::fastdds::rtps::ContentFilterProperty const*)::{lambda(eprosima::fastrtps::rtps::ReaderProxyData*, bool, eprosima::fastrtps::rtps::ParticipantProxyData const&)#1}::operator()(eprosima::fastrtps::rtps::ReaderProxyData*, bool, eprosima::fastrtps::rtps::ParticipantProxyData const&) const 0x00007ffff75bffe8
eprosima::fastrtps::rtps::PDP::addReaderProxyData(eprosima::fastrtps::rtps::GUID_t const&, eprosima::fastrtps::rtps::GUID_t&, std::function<bool (eprosima::fastrtps::rtps::ReaderProxyData*, bool, eprosima::fastrtps::rtps::ParticipantProxyData const&)>) 0x00007ffff75b02d6
eprosima::fastrtps::rtps::EDP::newLocalReaderProxyData(eprosima::fastrtps::rtps::RTPSReader*, eprosima::fastrtps::TopicAttributes const&, eprosima::fastdds::dds::ReaderQos const&, eprosima::fastdds::rtps::ContentFilterProperty const*) 0x00007ffff75c8fe2
eprosima::fastrtps::rtps::BuiltinProtocols::addLocalReader(eprosima::fastrtps::rtps::RTPSReader*, eprosima::fastrtps::TopicAttributes const&, eprosima::fastdds::dds::ReaderQos const&, eprosima::fastdds::rtps::ContentFilterProperty const*) 0x00007ffff75a130b
eprosima::fastdds::dds::DataReaderImpl::enable() 0x00007ffff7439a31
eprosima::fastdds::dds::DataReader::enable() 0x00007ffff742fc7a
eprosima::fastdds::dds::SubscriberImpl::create_datareader(eprosima::fastdds::dds::TopicDescription*, eprosima::fastdds::dds::DataReaderQos const&, eprosima::fastdds::dds::DataReaderListener*, eprosima::fastdds::dds::StatusMask const&) 0x00007ffff7428112
DynamicDataSubscriber::SubListener::on_type_information_received(eprosima::fastdds::dds::DomainParticipant*, eprosima::fastrtps::fixed_string<255ul>, eprosima::fastrtps::fixed_string<255ul>, eprosima::fastrtps::types::TypeInformation const&)::{lambda(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, eprosima::fastrtps::types::DynamicType_ptr)#1}::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, eprosima::fastrtps::types::DynamicType_ptr) const 0x00007ffff7b92bde
std::_Function_handler<void (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, eprosima::fastrtps::types::DynamicType_ptr), DynamicDataSubscriber::SubListener::on_type_information_received(eprosima::fastdds::dds::DomainParticipant*, eprosima::fastrtps::fixed_string<255ul>, eprosima::fastrtps::fixed_string<255ul>, eprosima::fastrtps::types::TypeInformation const&)::{lambda(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, eprosima::fastrtps::types::DynamicType_ptr)#1}>::_M_invoke(std::_Any_data const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, eprosima::fastrtps::types::DynamicType_ptr&&) 0x00007ffff7b932f4
eprosima::fastdds::dds::DomainParticipantImpl::check_get_type_request(eprosima::fastrtps::rtps::SampleIdentity const&, eprosima::fastrtps::types::TypeIdentifier const*, eprosima::fastrtps::types::TypeObject const*, eprosima::fastrtps::types::DynamicType_ptr) 0x00007ffff7466bd8
eprosima::fastdds::dds::DomainParticipantImpl::MyRTPSParticipantListener::on_type_discovery(eprosima::fastrtps::rtps::RTPSParticipant*, eprosima::fastrtps::rtps::SampleIdentity const&, eprosima::fastrtps::fixed_string<255ul> const&, eprosima::fastrtps::types::TypeIdentifier const*, eprosima::fastrtps::types::TypeObject const*, eprosima::fastrtps::types::DynamicType_ptr) 0x00007ffff7466d59
eprosima::fastdds::dds::builtin::TypeLookupReplyListener::onNewCacheChangeAdded(eprosima::fastrtps::rtps::RTPSReader*, eprosima::fastrtps::rtps::CacheChange_t const*) 0x00007ffff7480db9
eprosima::fastrtps::rtps::StatefulReader::NotifyChanges(eprosima::fastrtps::rtps::WriterProxy*) 0x00007ffff73618bd
eprosima::fastrtps::rtps::StatefulReader::change_received(eprosima::fastrtps::rtps::CacheChange_t*, eprosima::fastrtps::rtps::WriterProxy*, unsigned long) 0x00007ffff73619a6
eprosima::fastrtps::rtps::StatefulReader::processDataMsg(eprosima::fastrtps::rtps::CacheChange_t*) 0x00007ffff736a630
eprosima::fastrtps::rtps::MessageReceiver::process_data_message_without_security(eprosima::fastrtps::rtps::EntityId_t const&, eprosima::fastrtps::rtps::CacheChange_t&) 0x00007ffff738c79f
eprosima::fastrtps::rtps::MessageReceiver::proc_Submsg_Data(eprosima::fastrtps::rtps::CDRMessage_t*, eprosima::fastrtps::rtps::SubmessageHeader_t*) 0x00007ffff7396ffd
eprosima::fastrtps::rtps::MessageReceiver::processCDRMsg(eprosima::fastrtps::rtps::Locator_t const&, eprosima::fastrtps::rtps::Locator_t const&, eprosima::fastrtps::rtps::CDRMessage_t*) 0x00007ffff73998ab
eprosima::fastrtps::rtps::ReceiverResource::OnDataReceived(unsigned char const*, unsigned int, eprosima::fastrtps::rtps::Locator_t const&, eprosima::fastrtps::rtps::Locator_t const&) 0x00007ffff739cb76
eprosima::fastdds::rtps::SharedMemChannelResource::perform_listen_operation(eprosima::fastrtps::rtps::Locator_t) 0x00007ffff76df914
std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (eprosima::fastdds::rtps::SharedMemChannelResource::*)(eprosima::fastrtps::rtps::Locator_t), eprosima::fastdds::rtps::SharedMemChannelResource*, eprosima::fastrtps::rtps::Locator_t> > >::_M_run() 0x00007ffff76d55ac
<unknown> 0x00007ffff6bce6df
start_thread 0x00007ffff6ea16db
clone 0x00007ffff662961f
Steps to reproduce
。。。
Fast DDS version/commit
V2.6.0
Platform/Architecture
Ubuntu Focal 20.04 amd64
Transport layer
UDPv4
Additional context
No response
XML configuration file
No response
Relevant log output
No response
Network traffic capture
No response
@lubowu We check dynamically subscribing to a topic on this test.
Would you mind sharing a reproducible example, so we can analyze whether this is a bug or a misuse of the library?
workspace_DDSHelloWorld.zip TypeLookupService.zip 1、run HelloWorld ./HelloWorld publisher 2、run TypeLookupExample ./TypeLookupExample subscriber
Have you verified this problem?
@lubowu Sorry, we haven't had time yet to check this. We'll try to find some time for it this week.
Hi @lubowu,
Sorry for the delay in the response. I could reproduce the issue. Unfortunately, the current implementation supports simple types, but we are currently working on improving that. As a result, nesting the world struct inside the HelloWorldTopic would be invalid.
As a workaround, I suggest doing a couple of things, first, modifying the HelloWorld.idl (find it attached, HelloWorldMod), then applying the patch (also attached) that includes a correction when dealing with enums and finally edit the HelloWorldPublisher to publish messages of type HelloWorldTopicMod instead. Check if that overcomes the issue.