-
Notifications
You must be signed in to change notification settings - Fork 775
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
[15446] TypeObject for sequences/arrays/maps of nested types crashes #3296
Comments
@JLBuenoLopez-eProsima this other issue might be related: #2970 , since it seems there's an issue with default array values? It causes issues with printing too. I think there's a problem with default array values being deleted when they're not supposed to be. |
@methylDragon, Dynamic types feature is being refactored right now (in #3392). It is expected to be merged in the coming months. Sorry for the delay. |
I'm facing the same issue without any (apparent) nested type. Type definition:
version/commitSource code generated with Fast-DDS-Gen:
Fast-DDS:
ManifestationIn the call to the
of EDIT:I noticed that in EDIT (2):With Fast-DDS-Gen on eProsima/Fast-DDS-Gen#160 I was able to avoid the abovementioned segfault (
as |
Hi @methylDragon @gDorndorf @fwr-ml @AndreaFinazzi @doruktiktiklar, Fast DDS v3.0.0 has been released, including the mentioned Dynamic Types refactor. Could you check if the reported problems persist? |
@JesusPoderoso I'd love to, but lack the capacity, for now. Happy, if you've sorted it out, though. (Also, a PR of yours - #2207 I think - did the trick for me. My software doesn't learn DynamicType s remotely, so I think, I wouldn't test your changes anyway. |
As the Dynamic Types refactor has been already introduced in the latest Fast DDS v3.0.0, we internally agreed to close all Dynamic-Types related issues. Please, feel free to reopen it if the issue persists. |
Is there an already existing issue for this?
Expected behavior
Registering a TypeObject with a sequence/array/map with nested types is not supposed to crash.
Current behavior
General bug description
Registering a TypeObject coming from an IDL defining a sequence/array of a nested structure causes a crash.
This is caused when the TypeObject is only registered in one of the applications and the information is published with the DomainParticipant discovery information, DATA(p), and the remote application tries registering the TypeObject.
A bug in
TypeObjectFactory::is_type_identifier_complete
causes the crash.This method is called recursively for nested structures.
The nested structure has not been properly registered so the
element_identifier
isnullptr
.TypeObjectFactory::is_type_identifier_complete
does not have a safety check to ensure the validity of the given pointer.On the one hand, a patch adding this safety check ensuring that Fast DDS does not crash would be good to have.
On the other hand, registering a sequence/array/map with nested types should succeed.
This second point requires further investigation.
Workaround
This issue can be prevented avoiding publishing the TypeObject information in the DomainParticipant discovery information.
This can be configured within the
TopicDataType
class with membersauto_fill_type_object(false)
andauto_fill_type_information(false)
.Manifestations
This bug has several manifestations:
Dynamic types
Using a TypeObject that defines sequences/arrays/maps of nested types will fail unless the TypeObject is registered in every DomainParticipant (which is contrary to Dynamic types philosophy).
Consequently, this bug prevents the use of Dynamic types with these specific types.
Content Filtered Topics
In order to use the default filter class requires registering the TypeObject.
Consequently, this issue might appear.
Related issues
Steps to reproduce
The following IDL file can be used to generate the conflicting TypeObject using Fast DDS-Gen with
-typeobject
option enabled.Registering the TypeObject in one DomainParticipant and launching another DomainParticipant with only the DataType registered (not the TypeObject) will cause the crash of this second DomainParticipant.
Fast DDS version/commit
This bug was first reported in Fast DDS v2.3.x (#2184) and is still applying to every supported branch in Fast DDS, including master.
Platform/Architecture
Ubuntu Focal 20.04 amd64, Ubuntu Focal 20.04 arm64, Windows 10 Visual Studio 2019, MacOS Mojave 10.14
Transport layer
UDPv4, UDPv6, TCPv4, TCPv6, Shared Memory Transport (SHM), Intra-process, Data-sharing delivery, Zero copy
Additional context
No response
XML configuration file
No response
Relevant log output
No response
Network traffic capture
No response
The text was updated successfully, but these errors were encountered: