{"action":"created","issue":{"url":"https://api.github.com/repos/ros-visualization/rviz/issues/1456","repository_url":"https://api.github.com/repos/ros-visualization/rviz","labels_url":"https://api.github.com/repos/ros-visualization/rviz/issues/1456/labels{/name}","comments_url":"https://api.github.com/repos/ros-visualization/rviz/issues/1456/comments","events_url":"https://api.github.com/repos/ros-visualization/rviz/issues/1456/events","html_url":"https://github.com/ros-visualization/rviz/issues/1456","id":537085528,"node_id":"MDU6SXNzdWU1MzcwODU1Mjg=","number":1456,"title":"RViz segfaults when adding MotionPlanning plugin","user":{"login":"mvieth","id":39675748,"node_id":"MDQ6VXNlcjM5Njc1NzQ4","avatar_url":"https://avatars2.githubusercontent.com/u/39675748?v=4","gravatar_id":"","url":"https://api.github.com/users/mvieth","html_url":"https://github.com/mvieth","followers_url":"https://api.github.com/users/mvieth/followers","following_url":"https://api.github.com/users/mvieth/following{/other_user}","gists_url":"https://api.github.com/users/mvieth/gists{/gist_id}","starred_url":"https://api.github.com/users/mvieth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvieth/subscriptions","organizations_url":"https://api.github.com/users/mvieth/orgs","repos_url":"https://api.github.com/users/mvieth/repos","events_url":"https://api.github.com/users/mvieth/events{/privacy}","received_events_url":"https://api.github.com/users/mvieth/received_events","type":"User","site_admin":false},"labels":[{"id":14280919,"node_id":"MDU6TGFiZWwxNDI4MDkxOQ==","url":"https://api.github.com/repos/ros-visualization/rviz/labels/bug","name":"bug","color":"fc2929","default":true,"description":null},{"id":345432150,"node_id":"MDU6TGFiZWwzNDU0MzIxNTA=","url":"https://api.github.com/repos/ros-visualization/rviz/labels/need%20feedback%20or%20more%20info","name":"need feedback or more info","color":"bfdadc","default":false,"description":null}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2019-12-12T16:31:50Z","updated_at":"2019-12-13T13:40:33Z","closed_at":null,"author_association":"NONE","body":"<!-- Thanks for reporting an issue.\r\nPlease describe your issue in detail, such that it can be reproduced by somebody else.\r\n\r\nFor rendering issues, please provide:\r\n* A screenshot illustrating the issue (just drag-n-drop an image into your browser).\r\n* Source code to reproduce the issue, e.g. a YAML or rosbag file with a MarkerArray msg.\r\nUse [gist.github.com](gist.github.com) to copy-paste the console output or segfault backtrace using gdb.\r\n\r\nNote: Due to the lack of active maintainers, currently we can only provide limited support.\r\nParticularly, we focus on the latest release, Melodic, only.\r\nIf you can track the issue down yourself and provide a pull request, that would be a great help.\r\nThanks for considering this.\r\n-->\r\nWhen adding moveit's MotionPlanning plugin, rviz crashes with a segmentation fault. This seems to happen only if certain other types of displays are active (e.g. Polygon and PoseArray).\r\nHere an example output of valgrind:\r\n```\r\n==24091== Invalid read of size 8\r\n==24091==    at 0xF9361C9: ??? (in /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0.0.0)\r\n==24091==    by 0x33FAD60E: Ogre::GLHardwareBufferManagerBase::createVertexBuffer(unsigned long, unsigned long, Ogre::HardwareBuffer::Usage, bool) (in /usr/lib/x86_64-linux-gnu/OGRE-1.9.0/RenderSystem_GL.so.1.9.0)\r\n==24091==    by 0x33FC7825: ??? (in /usr/lib/x86_64-linux-gnu/OGRE-1.9.0/RenderSystem_GL.so.1.9.0)\r\n==24091==    by 0x98353D2: Ogre::ManualObject::end() (in /usr/lib/x86_64-linux-gnu/libOgreMain.so.1.9.0)\r\n==24091==    by 0x3A25FA9E: rviz::PoseArrayDisplay::updateArrows2d() (in /opt/ros/melodic/lib/librviz_default_plugin.so)\r\n==24091==    by 0x3A26056F: rviz::PoseArrayDisplay::updateDisplay() (in /opt/ros/melodic/lib/librviz_default_plugin.so)\r\n==24091==    by 0x3A260BEB: rviz::PoseArrayDisplay::processMessage(boost::shared_ptr<geometry_msgs::PoseArray_<std::allocator<void> > const> const&) (in /opt/ros/melodic/lib/librviz_default_plugin.so)\r\n==24091==    by 0x3A262BD2: rviz::MessageFilterDisplay<geometry_msgs::PoseArray_<std::allocator<void> > >::incomingMessage(boost::shared_ptr<geometry_msgs::PoseArray_<std::allocator<void> > const> const&) (in /opt/ros/melodic/lib/librviz_default_plugin.so)\r\n==24091==    by 0x3A263D9D: boost::detail::function::void_function_obj_invoker1<boost::function<void (boost::shared_ptr<geometry_msgs::PoseArray_<std::allocator<void> > const> const&)>, void, boost::shared_ptr<geometry_msgs::PoseArray_<std::allocator<void> > const> >::invoke(boost::detail::function::function_buffer&, boost::shared_ptr<geometry_msgs::PoseArray_<std::allocator<void> > const>) (in /opt/ros/melodic/lib/librviz_default_plugin.so)\r\n==24091==    by 0x3A268AEF: message_filters::CallbackHelper1T<boost::shared_ptr<geometry_msgs::PoseArray_<std::allocator<void> > const> const&, geometry_msgs::PoseArray_<std::allocator<void> > >::call(ros::MessageEvent<geometry_msgs::PoseArray_<std::allocator<void> > const> const&, bool) (in /opt/ros/melodic/lib/librviz_default_plugin.so)\r\n==24091==    by 0x3A267BCE: message_filters::Signal1<geometry_msgs::PoseArray_<std::allocator<void> > >::call(ros::MessageEvent<geometry_msgs::PoseArray_<std::allocator<void> > const> const&) (in /opt/ros/melodic/lib/librviz_default_plugin.so)\r\n==24091==    by 0x3A26CFC0: tf2_ros::MessageFilter<geometry_msgs::PoseArray_<std::allocator<void> > >::CBQueueCallback::call() (in /opt/ros/melodic/lib/librviz_default_plugin.so)\r\n==24091==  Address 0x1068 is not stack'd, malloc'd or (recently) free'd\r\n```\r\nAnd another one:\r\n```\r\n==19183== Thread 36:\r\n==19183== Invalid read of size 8\r\n==19183==    at 0xFBC01C9: ??? (in /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0.0.0)\r\n==19183==    by 0x33E1060E: Ogre::GLHardwareBufferManagerBase::createVertexBuffer(unsigned long, unsigned long, Ogre::HardwareBuffer::Usage, bool) (in /usr/lib/x86_64-linux-gnu/OGRE-1.9.0/RenderSystem_GL.so.1.9.0)\r\n==19183==    by 0x33E2A825: ??? (in /usr/lib/x86_64-linux-gnu/OGRE-1.9.0/RenderSystem_GL.so.1.9.0)\r\n==19183==    by 0x9ABF3D2: Ogre::ManualObject::end() (in /usr/lib/x86_64-linux-gnu/libOgreMain.so.1.9.0)\r\n==19183==    by 0x3CD3711D: rviz::PolygonDisplay::processMessage(boost::shared_ptr<geometry_msgs::PolygonStamped_<std::allocator<void> > const> const&) (in /home/mvieth/robocup/rviz_ws/devel/.private/rviz/lib/librviz_default_plugin.so)\r\n==19183==    by 0x3CD38BAE: rviz::MessageFilterDisplay<geometry_msgs::PolygonStamped_<std::allocator<void> > >::incomingMessage(boost::shared_ptr<geometry_msgs::PolygonStamped_<std::allocator<void> > const> const&) (in /home/mvieth/robocup/rviz_ws/devel/.private/rviz/lib/librviz_default_plugin.so)\r\n==19183==    by 0x3CD47372: boost::_mfi::mf1<void, rviz::MessageFilterDisplay<geometry_msgs::PolygonStamped_<std::allocator<void> > >, boost::shared_ptr<geometry_msgs::PolygonStamped_<std::allocator<void> > const> const&>::operator()(rviz::MessageFilterDisplay<geometry_msgs::PolygonStamped_<std::allocator<void> > >*, boost::shared_ptr<geometry_msgs::PolygonStamped_<std::allocator<void> > const> const&) const (in /home/mvieth/robocup/rviz_ws/devel/.private/rviz/lib/librviz_default_plugin.so)\r\n==19183==    by 0x3CD44F86: void boost::_bi::list2<boost::_bi::value<rviz::MessageFilterDisplay<geometry_msgs::PolygonStamped_<std::allocator<void> > >*>, boost::arg<1> >::operator()<boost::_mfi::mf1<void, rviz::MessageFilterDisplay<geometry_msgs::PolygonStamped_<std::allocator<void> > >, boost::shared_ptr<geometry_msgs::PolygonStamped_<std::allocator<void> > const> const&>, boost::_bi::rrlist1<boost::shared_ptr<geometry_msgs::PolygonStamped_<std::allocator<void> > const> const&> >(boost::_bi::type<void>, boost::_mfi::mf1<void, rviz::MessageFilterDisplay<geometry_msgs::PolygonStamped_<std::allocator<void> > >, boost::shared_ptr<geometry_msgs::PolygonStamped_<std::allocator<void> > const> const&>&, boost::_bi::rrlist1<boost::shared_ptr<geometry_msgs::PolygonStamped_<std::allocator<void> > const> const&>&, int) (in /home/mvieth/robocup/rviz_ws/devel/.private/rviz/lib/librviz_default_plugin.so)\r\n==19183==    by 0x3CD42D20: void boost::_bi::bind_t<void, boost::_mfi::mf1<void, rviz::MessageFilterDisplay<geometry_msgs::PolygonStamped_<std::allocator<void> > >, boost::shared_ptr<geometry_msgs::PolygonStamped_<std::allocator<void> > const> const&>, boost::_bi::list2<boost::_bi::value<rviz::MessageFilterDisplay<geometry_msgs::PolygonStamped_<std::allocator<void> > >*>, boost::arg<1> > >::operator()<boost::shared_ptr<geometry_msgs::PolygonStamped_<std::allocator<void> > const> const&>(boost::shared_ptr<geometry_msgs::PolygonStamped_<std::allocator<void> > const> const&) (in /home/mvieth/robocup/rviz_ws/devel/.private/rviz/lib/librviz_default_plugin.so)\r\n==19183==    by 0x3CD40C56: boost::detail::function::void_function_obj_invoker1<boost::_bi::bind_t<void, boost::_mfi::mf1<void, rviz::MessageFilterDisplay<geometry_msgs::PolygonStamped_<std::allocator<void> > >, boost::shared_ptr<geometry_msgs::PolygonStamped_<std::allocator<void> > const> const&>, boost::_bi::list2<boost::_bi::value<rviz::MessageFilterDisplay<geometry_msgs::PolygonStamped_<std::allocator<void> > >*>, boost::arg<1> > >, void, boost::shared_ptr<geometry_msgs::PolygonStamped_<std::allocator<void> > const> const&>::invoke(boost::detail::function::function_buffer&, boost::shared_ptr<geometry_msgs::PolygonStamped_<std::allocator<void> > const> const&) (in /home/mvieth/robocup/rviz_ws/devel/.private/rviz/lib/librviz_default_plugin.so)\r\n==19183==    by 0x3CD450AD: boost::function1<void, boost::shared_ptr<geometry_msgs::PolygonStamped_<std::allocator<void> > const> const&>::operator()(boost::shared_ptr<geometry_msgs::PolygonStamped_<std::allocator<void> > const> const&) const (in /home/mvieth/robocup/rviz_ws/devel/.private/rviz/lib/librviz_default_plugin.so)\r\n==19183==    by 0x3CD42E99: boost::detail::function::void_function_obj_invoker1<boost::function<void (boost::shared_ptr<geometry_msgs::PolygonStamped_<std::allocator<void> > const> const&)>, void, boost::shared_ptr<geometry_msgs::PolygonStamped_<std::allocator<void> > const> >::invoke(boost::detail::function::function_buffer&, boost::shared_ptr<geometry_msgs::PolygonStamped_<std::allocator<void> > const>) (in /home/mvieth/robocup/rviz_ws/devel/.private/rviz/lib/librviz_default_plugin.so)\r\n==19183==  Address 0x1068 is not stack'd, malloc'd or (recently) free'd\r\n```\r\nFrom what I can tell, the problem seems to be in the ManualObject of OGRE. More displays that use this may be affected. Maybe this is a concurrency problem and a lock is needed?\r\n\r\n### Your environment\r\n* OS Version: Ubuntu 18.04\r\n* ROS Distro: Melodic\r\n* RViz, Qt, OGRE, OpenGl version as printed by rviz:\r\n```\r\nrviz version 1.13.6\r\ncompiled against Qt version 5.9.5\r\ncompiled against OGRE version 1.9.0 (Ghadamon)\r\nForcing OpenGl version 0.\r\nStereo is NOT SUPPORTED\r\nOpenGl version: 4.6 (GLSL 4.6).\r\n```\r\n* If source build, which git commit? 11cc9ee213f11f70af9ad6383c033076466828e9\r\n"},"comment":{"url":"https://api.github.com/repos/ros-visualization/rviz/issues/comments/565444611","html_url":"https://github.com/ros-visualization/rviz/issues/1456#issuecomment-565444611","issue_url":"https://api.github.com/repos/ros-visualization/rviz/issues/1456","id":565444611,"node_id":"MDEyOklzc3VlQ29tbWVudDU2NTQ0NDYxMQ==","user":{"login":"mvieth","id":39675748,"node_id":"MDQ6VXNlcjM5Njc1NzQ4","avatar_url":"https://avatars2.githubusercontent.com/u/39675748?v=4","gravatar_id":"","url":"https://api.github.com/users/mvieth","html_url":"https://github.com/mvieth","followers_url":"https://api.github.com/users/mvieth/followers","following_url":"https://api.github.com/users/mvieth/following{/other_user}","gists_url":"https://api.github.com/users/mvieth/gists{/gist_id}","starred_url":"https://api.github.com/users/mvieth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvieth/subscriptions","organizations_url":"https://api.github.com/users/mvieth/orgs","repos_url":"https://api.github.com/users/mvieth/repos","events_url":"https://api.github.com/users/mvieth/events{/privacy}","received_events_url":"https://api.github.com/users/mvieth/received_events","type":"User","site_admin":false},"created_at":"2019-12-13T13:40:33Z","updated_at":"2019-12-13T13:40:33Z","author_association":"NONE","body":"> I meant to build an older release, e.g. 1.13.5 or even older\r\n\r\nI now tested 1.13.5 and 1.13.3 (on the melodic system, with git checkout and build from source). Both versions have the bug\r\n\r\n> Do you display a large number of polygons / pose arrays?\r\n\r\nI wouldn't say so. This publish command can be used to reproduce the bug (one triangle at 10 hz):\r\n```\r\nrostopic pub /polygon geometry_msgs/PolygonStamped \"header:\r\n  seq: 0\r\n  stamp:\r\n    secs: 0\r\n    nsecs: 0\r\n  frame_id: 'base_footprint'\r\npolygon:\r\n  points:\r\n  - x: 0.0\r\n    y: 0.0\r\n    z: 0.0 \r\n  - x: 1.0\r\n    y: 0.0\r\n    z: 0.0\r\n  - x: 0.0\r\n    y: 1.0\r\n    z: 0.0\" -r 10\r\n```\r\n\r\n> Is the order of activation of those displays relevant, i.e. what happens when you permute the order of adding displays?\r\n\r\nIf I add the polygon display first, and then the MotionPlanning plugin, the segfault happens. If I add the MotionPlanning plugin first, and then the polygon display, everything works fine\r\n\r\n> Is it always the same address 0x1068 = 4200 that is (wrongly) dereferenced?\r\n\r\nIt also appeared with address 0x1060. Do you think this is more than a coincidence?\r\n\r\n> Finally, you could try building against a more recent Ogre release as this seems to be an Ogre issue\r\n\r\nI will see if I can do that later"}}
{"actor":{"display_login":"mvieth"}}