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

HeaderlessTopicDiagnostic should clean up after itself #78

Open
poggenhans opened this issue Mar 9, 2018 · 0 comments
Open

HeaderlessTopicDiagnostic should clean up after itself #78

poggenhans opened this issue Mar 9, 2018 · 0 comments

Comments

@poggenhans
Copy link

The HeaderlessTopicDiagnostic object registers a callback to the Updater class that is not removed, when HeaderlessTopicDiagnostic goes out of scope. The next update() then leads to a segfault.

Here is code to reproduce the issue:

using namespace diagnostic_updater;
Updater updater;
double min_freq{0.}, max_freq{std::numeric_limits<double>::infinity()};
auto diag = std::make_unique<TopicDiagnostic>( "topic_name", updater,  
                    FrequencyStatusParam(&min_freq, &max_freq, 0, 5), TimeStampStatusParam(0, 1));
updater.force_update(); // ok
diag.reset();
updater.force_update(); // segfault
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant