From d0e01a7da890d58ec3593131c4cc108f46a77b28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Tue, 15 Aug 2023 22:55:28 +0200 Subject: [PATCH] Fixed crash when raycasting while map is updated MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alejandro Hernández Cordero --- .../src/rviz_default_plugins/displays/map/map_display.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rviz_default_plugins/src/rviz_default_plugins/displays/map/map_display.cpp b/rviz_default_plugins/src/rviz_default_plugins/displays/map/map_display.cpp index 9d3002ce6..d557e6b48 100644 --- a/rviz_default_plugins/src/rviz_default_plugins/displays/map/map_display.cpp +++ b/rviz_default_plugins/src/rviz_default_plugins/displays/map/map_display.cpp @@ -72,7 +72,11 @@ MapDisplay::MapDisplay() update_profile_(rclcpp::QoS(5)), update_messages_received_(0) { - connect(this, SIGNAL(mapUpdated()), this, SLOT(showMap())); + // HACK: Using a direct connection triggers a segfault on NVIDIA hardware (#1793) when rendering + // *and* having performed a depth rendering before (e.g. due to raycasting for selections) + // A queued connection delays the update of renderables after the current + // VisualizationManager::onUpdate() call + connect(this, SIGNAL(mapUpdated()), this, SLOT(showMap()), Qt::QueuedConnection); update_topic_property_ = new rviz_common::properties::RosTopicProperty( "Update Topic", "",