Gazebo crashes on Ubuntu 18.04 running on WSL and X11
I am trying to setup Gazebo 9.0.0 on my Windows 10 machine using WSL and UBUNTU 18.04, I installed ROS-MELODIC full desktop and I cannot fix "Segmentation fault (core dump)" causing "[gazebo_gui-6] process has died [pid 11366, exit code 139] ..." I tried various X11 clients and I had best result with MobaXterm because I can see Gazebo logo appearing when I disable OpenGL acceleration. in all other clients Xterm, VcXsrv I didn't even get that. I tested the same code in virtual machine and there it was working fine, here is full log from launch to crash:
NODES
/simple_arm/
spawner (controller_manager/spawner)
/
arm_mover (simple_arm/arm_mover)
gazebo (gazebo_ros/gzserver)
gazebo_gui (gazebo_ros/gzclient)
joint_state_publisher (joint_state_publisher/joint_state_publisher)
look_away (simple_arm/look_away)
robot_state_publisher (robot_state_publisher/robot_state_publisher)
urdf_spawner (gazebo_ros/spawn_model)
auto-starting new master
process[master]: started with pid [11343]
ROS_MASTER_URI=http://localhost:11311
setting /run_id to 9caab59a-e8ee-11e9-9310-d89ef31f92c1
process[rosout-1]: started with pid [11354]
started core service [/rosout]
process[joint_state_publisher-2]: started with pid [11357]
process[robot_state_publisher-3]: started with pid [11359]
process[simple_arm/spawner-4]: started with pid [11363]
process[gazebo-5]: started with pid [11364]
process[gazebo_gui-6]: started with pid [11366]
process[urdf_spawner-7]: started with pid [11373]
process[arm_mover-8]: started with pid [11380]
process[look_away-9]: started with pid [11382]
[INFO] [1570444718.280137, 0.000000]: Controller Spawner: Waiting for service controller_manager/load_controller
[ INFO] [1570444718.824315400]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1570444718.825815800]: waitForService: Service [/gazebo_gui/set_physics_properties] has not been advertised, waiting...
[ INFO] [1570444718.841511900]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1570444718.843856300]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
shared memfd open() failed: Function not implemented
shared memfd open() failed: Function not implemented
[INFO] [1570444719.863749, 0.000000]: Loading model XML from ros parameter robot_description
[INFO] [1570444719.870806, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default
AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': No such file or directory
[INFO] [1570444720.175972, 0.000000]: Calling service /gazebo/spawn_urdf_model
[INFO] [1570444720.321593, 0.000000]: Spawn status: SpawnModel: Successfully spawned entity
[ INFO] [1570444720.346787500]: Loading gazebo_ros_control plugin
[ INFO] [1570444720.347388700]: Starting gazebo_ros_control plugin in namespace: /simple_arm
[ INFO] [1570444720.354179500]: gazebo_ros_control plugin is waiting for model URDF in parameter [/robot_description] on the ROS param server.
[ WARN] [1570444720.468903400]: Deprecated syntax, please prepend 'hardware_interface/' to 'EffortJointInterface' within the <hardwareInterface> tag in joint 'joint_1'.
[ WARN] [1570444720.470349700]: Deprecated syntax, please prepend 'hardware_interface/' to 'EffortJointInterface' within the <hardwareInterface> tag in joint 'joint_2'.
[ INFO] [1570444720.477852200]: Loaded gazebo_ros_control.
[ INFO] [1570444720.517822400, 261.203000000 ...
Did you ever get this resolved? I am having a similar issue.