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

Remove NodeShared singleton #101

Open
osrf-migration opened this issue Feb 4, 2019 · 1 comment
Open

Remove NodeShared singleton #101

osrf-migration opened this issue Feb 4, 2019 · 1 comment
Labels
critical enhancement New feature or request

Comments

@osrf-migration
Copy link

Original report (archived issue) by Nate Koenig (Bitbucket: Nathan Koenig).


Summary

NodeShared is a singleton, which can lead to runtime problems particularly during shutdown. One problem occurs when two nodes are in the same process, with one node publishing messages that the other node consumes and then publishes new messages. I see a segfault when running this code (https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-launch/commits/11b5830128da4561711a043c6450545a7b90c0a4 (gazebosim/gz-launch@eea15ce)) with this configuration file( https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-launch/commits/11b5830128da4561711a043c6450545a7b90c0a4 (gazebosim/gz-launch@eea15ce)#chg-config/gazebo.ign). When this version of ign-launch is installed, you can test using ign launch -f config/gazebo.ign.

Motivation

In addition to the above error, we are trying to remove singletons from our code base. For reasons see https://stackoverflow.com/questions/137975/what-is-so-bad-about-singletons/138012#138012 and https://cocoacasts.com/are-singletons-bad.

Describe alternatives you've considered

I think @caguero mentioned that we could potentially use features built into ZeroMq to avoid the NodeShared singleton.

@osrf-migration osrf-migration added critical enhancement New feature or request labels Apr 15, 2020
@joxoby
Copy link
Contributor

joxoby commented Aug 27, 2020

Related: #137

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
critical enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants