-
Notifications
You must be signed in to change notification settings - Fork 486
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
Check for nullptr in TopicManager::ConnectPubToSub #2978
Check for nullptr in TopicManager::ConnectPubToSub #2978
Conversation
Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
I'm not sure I'll be able to make the regression test reliably fail without the fix - it seems that the Boost assertion isn't doing anything in this test when playing around with it, though it does always crash my example program as mentioned in #2875. I'm not sure exactly how to handle the testing for this - I could use input from someone more familiar with gazebo/boost test/build setup. |
I see it crashing in both platforms and on my local machine so I think the test case is valid. After the patch the CI does not display this crashing anymore. |
Co-authored-by: Jose Luis Rivero <jrivero@osrfoundation.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR and iterations @emersonknapp
Fixes #2875
This was causing a very occasional crash problem in real runs, and is reliably reproducible by the method shown in #2875 (comment) - which case is explicitly forced by the added regression test. Though it's a pathological case, there is nothing illegal about the test's usage of a global, public API, and therefore it needs the protection.
The crash case of #2875 is particularly bad in that it allows the server process to be crashed by an external process' actions - all it takes is a mis-timed "sub" message to the server.
This issue also exists in Gazebo9 and will need to be backported.