-
Notifications
You must be signed in to change notification settings - Fork 466
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
Rviz crashes when started with specific tf but not others #911
Comments
@CaffeineSqurr is possible for you to share a bag file with just the |
Here's the bag with only the tf messages |
Thanks @CaffeineSqurr, I'll have a look at it as soon as I'm able. If you find out more or find a solution please let us know. |
This bug, along with the related ones #808 #616 (and the tf saving issue #834), I spent a bit of
Which corresponds to the following call in tf_display.cpp:580 // Delete the old tree property.
delete frame->tree_property_;
frame->tree_property_ = NULL;
// If the parent has a tree property, make a new tree property for this frame.
if( parent->tree_property_ )
{
frame->tree_property_ = new Property( QString::fromStdString( frame->name_ ), QVariant(), "", parent->tree_property_ );
} By doing a bit more gdb magic, we notice that the parent object has an adress, but that none of it's functions or attributes are accessible:
Okay, so, we've got some corrupted memory somewhere. I really am not surprised, considering how this property_tree_ is handled. It is destroyed/recreated here and there, in function either called by periodic timer update, or by manually using the reset button and so on... One quick testing hack "resolves" the issue. Commenting line 574 // Delete the old tree property.
// delete frame->tree_property_;
frame->tree_property_ = NULL;
// If the parent has a tree property, make a new tree property for this frame.
if( parent->tree_property_ )
{
frame->tree_property_ = new Property( QString::fromStdString( frame->name_ ), QVariant(), "", parent->tree_property_ );
} However, this most likely creates a memory leak. My guess is that the problem originates from race conditions between threads deleting the tree_property_ while others are trying to use it, thus causing random bugs. Now, I don't really have the time to figure out how to solve this properly, it would be nice if someone more familiar with rviz could look into it. The bug can be reproduced in several (not always crashing, but quite frequent with a fair amount of published tf):
|
@hershwg Why is the property tree deleted and then recreated, instead of just being updated? |
…et/create Do not needlessly delete tree_property_ elements, update them instead. Most likely fixes ros-visualization#808 too.
Please comment if #926 doesn't solve the issue for you. |
I'm playing back a bag with a occupancy_grid, pointclouds, and a tf system. If the fixed frame is set to a specific (which happens to be the root of the tf tree) rviz will crash the moment bag playback starts. If the fixed frame is set to any other frame in the bag the playback will work correctly. After the first set of messages are displayed you can set the fixed frame to any other frame and rviz is fine. It doesn't matter how far into the bag I start playback the same thing happens. I've only included the gdb backtrace but I can include everything rviz prints on startup (its a lot of text) if desired.
The text was updated successfully, but these errors were encountered: