ros-visualization/rviz

RVIZ crashes on load with segmentation fault (core dumped)

Closed this issue · 1 comments

Hey. 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]
[ INFO] [1642155667.631433022]: RPLIDAR running on ROS package rplidar_ros. SDK Version:1.9.0
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
[ INFO] [1642155668.144757265]: Firmware Ver: 1.27
[ INFO] [1642155668.144890910]: Hardware Rev: 6
[ INFO] [1642155668.147313544]: RPLidar health status : 0
qt.qpa.xcb: QXcbConnection: XCB error: 1 (BadRequest), sequence: 168, resource id: 53, major code: 131 (Unknown), minor code: 47
[ INFO] [1642155668.795137417]: current scan mode: Sensitivity, max_distance: 25.0 m, Point number: 15.9K , angle_compensate: 4
[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'
[ INFO] [1642155951.722014067]: rviz version 1.14.11
[ INFO] [1642155951.722219222]: compiled against Qt version 5.12.8
[ INFO] [1642155951.722283544]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1642155951.773808847]: Forcing OpenGl version 0.
qt.qpa.xcb: QXcbConnection: XCB error: 1 (BadRequest), sequence: 168, resource id: 53, major code: 131 (Unknown), minor code: 47
Segmentation fault (core dumped)

Your environment

Using this Docker Image: https://hub.docker.com/layers/ros/library/ros/noetic-ros-core-focal/images/sha256-f14979b3e99f29bf1433552bfd1a3b683b87660395033f7902fcee9aa638f885?context=explore

  • RViz, Qt, OGRE, OpenGl version as printed by rviz:
[ INFO] [1642155951.722014067]: rviz version 1.14.11
[ INFO] [1642155951.722219222]: compiled against Qt version 5.12.8
[ INFO] [1642155951.722283544]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1642155951.773808847]: Forcing OpenGl version 0.

Help would be wonderfull.

rviz in docker works w/o problems for me. I guess you followed the general instructions here?
In general, this question should be better asked at https://answers.ros.org. Please, post real issues and bug reports here only.