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
Fix crash if no window_context exists #523
Conversation
In TrajectoryVisualization::onInitialize the existance of a window_context is checked and the trajectory_slider_panel_ and trajectory_slider_dock_panel_ are only created if it exists. However later on these two pointers are assumed to be valid (non-NULL) and not checked any further.
hey @simonschmeisser, did you encounter this segfault or is this patch preventive? If this is relevant, we have to cherry-pick it to i/j too. |
@v4hn we do encounter a crash when it tries to set the title of the non-existent panel. We use several rviz::Display and one rviz::PropertyTreeWithHelp in our application but don't have a central rviz window and thus the window_context == nullptr |
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.
I see. Makes sense.
Thanks a lot for the patch and I'm sorry for the inconvenience. :/
+1 . Should be picked to i/j.
@davetcoleman, @130s please review/merge. |
The related pull request is #525. |
I'm not sure how to reproduce the issue. Assuming from the comment #523 (comment) by @simonschmeisser, it can only be replicated from source code (I don't know on RViz GUI how to set a title on a non-existent panel)? So I leave the decision up to others. |
merging. We want to have this regression-fix in the next release. |
In TrajectoryVisualization::onInitialize the existance of a window_context is checked and the trajectory_slider_panel_ and trajectory_slider_dock_panel_ are only created if it exists. However later on these two pointers are assumed to be valid (non-NULL) and not checked any further.
In TrajectoryVisualization::onInitialize the existance of a window_context is checked and the trajectory_slider_panel_ and trajectory_slider_dock_panel_ are only created if it exists. However later on these two pointers are assumed to be valid (non-NULL) and not checked any further.
cherry-picked to i/j |
#491 introduced a regression:
In TrajectoryVisualization::onInitialize the existance of a window_context is checked and the trajectory_slider_panel_ and trajectory_slider_dock_panel_ are only created if it exists.
However later on these two pointers are assumed to be valid (non-NULL) and not checked any further.