RVIZ crashes on load with segmentation fault (core dumped)
Hey,
I already opened a issue on GitHub, if you want to check it out: https://github.com/ros-visualization/...
I'm trying to run a SLAM Robot including rplidar_ros and hector_slam as a ROS project inside a docker container. The installation should be correct and for example the launch of the lidar is working (launched as roslaunch rplidar_ros rplidar_a3.launch
).
That makes me think, that the docker is set up correctly. However, when I try to launch a node which uses rviz, rviz is crashing. Sometimes rviz pops up and crashes like half a second later, sometimes it doesen't even show up.
So if I launch the file like this: roslaunch rplidar_ros view_rplidar_a3.launch
the error looks like that:
process[rplidarNode-1]: started with pid [547]
process[rviz-2]: started with pid [553]
qt.qpa.xcb: failed to initialize XRandr
qt.qpa.xcb: X server does not support XInput 2
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
RPLIDAR S/N: DB8D9A87C5E392D2A5E492F84B58316C
qt.qpa.xcb: QXcbConnection: XCB error: 1 (BadRequest), sequence: 168, resource id: 53, major code: 131 (Unknown), minor code: 47
[rviz-2] process has died [pid 553, exit code -11, cmd /opt/ros/noetic/lib/rviz/rviz -d /schwarmroboter_ws/src/rplidar_ros/rviz/rplidar.rviz __name:=rviz __log:=/root/.ros/log/44a83bc6-7521-11ec-89d0-0242ac110002/rviz-2.log].
log file: /root/.ros/log/44a83bc6-7521-11ec-89d0-0242ac110002/rviz-2*.log
So first I thought it's an issue with the qt and xserver, but other graphical applications work. I did a lot of research to find the issue and saw a recommendation to run rviz normally. So the next thing I did was run rviz like this: rosrun rviz rviz.
This proceeds in the following error:
root@1b02a0358157:/schwarmroboter_ws# rosrun rviz rviz
qt.qpa.xcb: failed to initialize XRandr
qt.qpa.xcb: X server does not support XInput 2
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
qt.qpa.xcb: QXcbConnection: XCB error: 1 (BadRequest), sequence: 168, resource id: 53, major code: 131 (Unknown), minor code: 47
Segmentation fault (core dumped)
Environment
Using this Docker Image: https://hub.docker.com/layers/ros/lib... and created the Dockerfile which can be found here: https://github.com/lschirmbrand/DHBW_...
RViz, Qt, OGRE, OpenGl version as printed by rviz: