-
Notifications
You must be signed in to change notification settings - Fork 98
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
segfault in purgeGraveyardOfMetaobjects #8
Comments
(also happens for depthcloud and image) |
This is what class_loader does: [ INFO] /rviz_1358299800181619123: class_loader::class_loader_private: Also destroying metaobject 0x34301c0 (class = compressed_depth_image_transport::CompressedDepthPublisher, base_class = image_transport::PublisherPlugin, library_path = /opt/ros/groovy/lib//libcompressed_depth_image_transport.so) in addition to purging it from graveyard. |
Here's again a backtrace with line numbers, plus some warnings: [ INFO] /rviz_1358299911399768852: pluginlib WARNING: PLUGINLIB_DECLARE_CLASS is deprecated, please use PLUGINLIB_EXPORT_CLASS instead. You can run the script 'plugin_macro_update' provided with pluginlib in your package source folder to automatically and recursively update legacy macros. Program received signal SIGSEGV, Segmentation fault. |
Same as ros-visualization/rviz#559 |
I'm running everything from sources. |
Interesting, let me try to recreate the issue |
It's actually happening when I add the second Image/Camera/DepthCloud display. dgossow@lex:~/wsrviz$ ls src |
Strange, I'm exhibiting this behavior too. I had fixed this problem...the only difference is that I was running debug code. Argh, back to the drawing board. |
Fixed with class_loader 0.1.25 (0375e760af6f42bc481c149a5754de58d3a52c86). The problem was that the metaobject destructors were being defined in a header file. As metaobject.h is included by class_loader_core.h which is included by class_loader.h which is included by pluginlib/class_loader.h, this creates a definition of the destructor in both libclass_loader.so as well as the plugin library. This causes problems with graveyarding when you open a pure plugin library, close it, then reopen it again. On the second load, graveyard objects are being purged from the previous load. However, the destructor address that is linked is within the plugin library (e.g. libcompressedepthimagetransport.so). When the library is reloaded, the destructor address changes...the graveyarded objects expect the address from the first load. I've removed the deconstructors from the header file to guarantee the version used is always within libclass_loader.so. I was not able to confirm this as it seems C++ does not let you get a pointer to the destructor for a class. However, my fix alleviates the problem so I'm confident that this is the issue. |
👍 |
I can confirm that this doesn't happen any more on my machine. |
This happens when I add a camera display in rviz.
rviz: 0f71e032dbe5310e78054cb0f7b10c62aa2ac4df
pluginlib: f684438
#0 0x00007ffff45405c0 in class_loader::class_loader_private::purgeGraveyardOfMetaobjects(std::string const&, class_loader::ClassLoader*, bool) () from /opt/ros/groovy/lib/libclass_loader.so
#1 0x00007ffff4542e50 in class_loader::class_loader_private::loadLibrary(std::string const&, class_loader::ClassLoader*) ()
from /opt/ros/groovy/lib/libclass_loader.so
#2 0x00007ffff453f216 in class_loader::ClassLoader::loadLibrary() () from /opt/ros/groovy/lib/libclass_loader.so
#3 0x00007ffff453f3b8 in class_loader::ClassLoader::ClassLoader(std::string const&, bool) () from /opt/ros/groovy/lib/libclass_loader.so
#4 0x00007ffff4545dd0 in class_loader::MultiLibraryClassLoader::loadLibrary(std::string const&) ()
from /opt/ros/groovy/lib/libclass_loader.so
#5 0x00007ffff7ae2480 in pluginlib::ClassLoader<image_transport::SubscriberPlugin>::loadLibraryForClass (this=0x7fffffffc230,
#6 0x00007ffff7aeb07c in pluginlib::ClassLoader<image_transport::SubscriberPlugin>::createInstance (this=0x7fffffffc230,
#7 0x00007ffff7adb840 in rviz::ImageDisplayBase::scanForTransportSubscriberPlugins (this=0x1ef6520)
#8 0x00007ffff7adc001 in rviz::ImageDisplayBase::ImageDisplayBase (this=0x1ef6520)
#9 0x00007fffac3fd8e9 in rviz::CameraDisplay::CameraDisplay (this=0x1ef6520)
#10 0x00007fffac4061ea in class_loader::class_loader_private::MetaObject<rviz::CameraDisplay, rviz::Display>::create (
#11 0x00007ffff7ac8393 in class_loader::class_loader_private::createInstancerviz::Display (derived_class_name=..., loader=0x17cd670)
#12 0x00007ffff7ac86cf in createUnmanagedInstancerviz::Display (derived_class_name=..., this=0x17cd670)
#13 class_loader::MultiLibraryClassLoader::createUnmanagedInstancerviz::Display (this=, class_name=...)
#14 0x00007ffff7ac884c in pluginlib::ClassLoaderrviz::Display::createUnmanagedInstance (this=0x2c1b1c0, lookup_name=...)
#15 0x00007ffff7ac8fe2 in rviz::PluginlibFactoryrviz::Display::makeRaw (this=0x2b9f250, class_id=..., error_return=0x7fffffffc920)
#16 0x00007ffff7abeb43 in rviz::DisplayFactory::makeRaw (this=0x2b9f250, class_id=..., error_return=)
#17 0x00007ffff7abfd24 in rviz::ClassIdRecordingFactoryrviz::Display::make (this=0x2b9f250, class_id=..., error_return=)
#18 0x00007ffff7acb976 in rviz::DisplayGroup::createDisplay (this=, class_id=...)
#19 0x00007ffff7b6440d in rviz::VisualizationManager::createDisplay (this=0x2b53630, class_lookup_name=..., name=..., enabled=true)
#20 0x00007ffff7acdb24 in rviz::DisplaysPanel::onNewDisplay (this=0x2c95c00)
The text was updated successfully, but these errors were encountered: