You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
owillebo
changed the title
Deadlock when calling createRTPSWriter in a ReaderListener::on_new_cache_change_added call.
Deadlock when calling RTPSDomain::createRTPSWriter in a ReaderListener::on_new_cache_change_added call.
Nov 27, 2024
The approach you are using is something that should never be done. The on_new_cache_change_added method is intended solely for processing new CacheChanges received in incoming messages, not for creating new entities. Using it for entity creation can lead to unintended behavior.
We recommend reviewing our RTPS example for proper usage of this methods.
If you have further questions, feel free to ask!
I reviewed the examples extensively. You are right that in these examples no entities are created in the on_new_cache_change_added.
I'm replacing a homebrew RTPS implementation with Fast-DDS (RTPS). The homebrew RTPS implementation allowed for creating entities upon incoming changes and this is used for a command-reply mechanism. With this command-reply mechanism participants have a reply and command reader. A reply writer is created upon receiving a command, hence the creation of a writer in on_new_cache_change_added.
Thanks again for making clear that this is not possible in Fast-DDS. I already have implemented a workaround.
Is there an already existing issue for this?
Expected behavior
No dead lock.
Current behavior
Dead lock.
Steps to reproduce
Call RTPSDomain::createRTPSWriter in a ReaderListener::on_new_cache_change_added call.
Fast DDS version/commit
Platform/Architecture
Other. Please specify in Additional context section.
Transport layer
UDPv4
Additional context
Windows 10 Visual Studio 2022
XML configuration file
Relevant log output
Network traffic capture
NA
The text was updated successfully, but these errors were encountered: