conda-forge / gazebo-feedstock

A conda-smithy repository for gazebo.
BSD 3-Clause "New" or "Revised" License
9 stars 8 forks source link

MacOS - Gazebo: Cannot Add Model to World because simulation is not running #148

Closed traversaro closed 1 year ago

traversaro commented 2 years ago

Solution to issue cannot be found in the documentation.

Issue

Even if a user starts gazebo from the terminal, the GUI gets launched, but apparently no simulation is running. This has been already reported in https://github.com/RoboStack/ros-noetic/issues/279, but with @nunoguedelha we reproduced it without any ROS involved.

traversaro commented 2 years ago

@nunoguedelha can you report the installed packages (mamba list) in the working env and in the not working one?

traversaro commented 2 years ago

I reproduce the issue on macOS on an M1 machine, i.e. arm64.

What happens is that it seems that gz client is not connected to any simulation server, i.e. all the simulation time display are not updated, and gzclient output is:

(gazebo) icub@iCubs-Mac-mini ~ % gzclient --verbose
Gazebo multi-robot simulator, version 11.11.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 10.240.11.19
[Wrn] [GuiIface.cc:120] Populating font family aliases took 74 ms. Replace uses of missing font family "Sans" with one that exists to avoid this cost. 
[Dbg] [ModelIter.cc:201] Got response [{"errcode":3017,"msg":"Page not found","extra":null,"errid":"cea76bd4-b5dd-420d-9313-7a9575395919","route":"GET /1.0/models?page=119","user-agent":"Gazebo 11.11.0(Mac OSX)","remote-address":"90.147.26.232"}
]
[Wrn] [Event.cc:61] Warning: Deleting a connection right after creation. Make sure to save the ConnectionPtr from a Connect call
zsh: segmentation fault  gzclient --verbose

Also gz stats just hangs when launched.

These are the packages installed.

conda info :

~~~ (gazebo) icub@iCubs-Mac-mini ~ % conda info active environment : gazebo active env location : /Users/icub/mambaforge/envs/gazebo shell level : 1 user config file : /Users/icub/.condarc populated config files : /Users/icub/mambaforge/.condarc /Users/icub/.condarc conda version : 4.12.0 conda-build version : not installed python version : 3.9.13.final.0 virtual packages : __osx=12.3.1=0 __unix=0=0 __archspec=1=arm64 base environment : /Users/icub/mambaforge (writable) conda av data dir : /Users/icub/mambaforge/etc/conda conda av metadata url : None channel URLs : https://conda.anaconda.org/conda-forge/osx-arm64 https://conda.anaconda.org/conda-forge/noarch package cache : /Users/icub/mambaforge/pkgs /Users/icub/.conda/pkgs envs directories : /Users/icub/mambaforge/envs /Users/icub/.conda/envs platform : osx-arm64 user-agent : conda/4.12.0 requests/2.27.1 CPython/3.9.13 Darwin/21.4.0 OSX/12.3.1 UID:GID : 501:20 netrc file : None offline mode : False ~~~

conda list :

~~~ (gazebo) icub@iCubs-Mac-mini ~ % conda list # packages in environment at /Users/icub/mambaforge/envs/gazebo: # # Name Version Build Channel aom 3.4.0 hbe31e94_1 conda-forge assimp 5.2.4 h3287542_0 conda-forge atk-1.0 2.36.0 heb41896_4 conda-forge blosc 1.21.1 hd414afc_3 conda-forge boost-cpp 1.74.0 h1cb353e_8 conda-forge bullet-cpp 3.21 py310ha6a5cd6_3 conda-forge bzip2 1.0.8 h3422bc3_4 conda-forge c-ares 1.18.1 h3422bc3_0 conda-forge ca-certificates 2022.6.15 h4653dfc_0 conda-forge cairo 1.16.0 h73a0509_1013 conda-forge cfitsio 4.1.0 hd4f5c17_0 conda-forge console_bridge 1.0.2 h3e96240_1 conda-forge cppzmq 4.8.1 h3212551_0 conda-forge curl 7.83.1 h2fcd78c_0 conda-forge dartsim 6.12.2 h87d442c_1 conda-forge eigen 3.4.0 hc021e02_0 conda-forge expat 2.4.8 h6b3803e_0 conda-forge fcl 0.7.0 h9fc178f_1 conda-forge ffmpeg 4.4.2 gpl_hfdc7bce_107 conda-forge flann 1.9.1 hd3e9afc_1011 conda-forge font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge font-ttf-inconsolata 3.000 h77eed37_0 conda-forge font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge font-ttf-ubuntu 0.83 hab24e00_0 conda-forge fontconfig 2.14.0 hfb34624_0 conda-forge fonts-conda-ecosystem 1 0 conda-forge fonts-conda-forge 1 0 conda-forge freeimage 3.18.0 hb513136_10 conda-forge freetype 2.12.1 hd633e50_0 conda-forge freexl 1.0.6 h27ca646_0 conda-forge fribidi 1.0.10 h27ca646_0 conda-forge gazebo 11.11.0 ha8b5a5e_12 conda-forge gdk-pixbuf 2.42.8 hdded42e_0 conda-forge geos 3.11.0 h9a09cb3_0 conda-forge geotiff 1.7.1 hc898e3f_3 conda-forge gettext 0.19.8.1 h049c9fb_1008 conda-forge giflib 5.2.1 h27ca646_2 conda-forge glib 2.72.1 h332123e_0 conda-forge glib-tools 2.72.1 h332123e_0 conda-forge gmp 6.2.1 h9f76cd9_0 conda-forge gnutls 3.7.7 h27a1928_0 conda-forge graphite2 1.3.13 h9f76cd9_1001 conda-forge graphviz 5.0.1 h37ddf74_0 conda-forge gst-plugins-base 1.20.3 h8b7775e_1 conda-forge gstreamer 1.20.3 hcb7b3dd_1 conda-forge gtk2 2.24.33 h57013de_2 conda-forge gts 0.7.6 h4b6d4d6_2 conda-forge harfbuzz 5.1.0 hd36a07e_0 conda-forge hdf4 4.2.15 hc683e77_4 conda-forge hdf5 1.12.2 nompi_h8968d4b_100 conda-forge icu 70.1 h6b3803e_0 conda-forge imath 3.1.5 h1280f1d_0 conda-forge jpeg 9e he4db4b2_2 conda-forge json-c 0.16 hc449e50_0 conda-forge jsoncpp 1.9.5 hc021e02_1 conda-forge jxrlib 1.1 h27ca646_2 conda-forge kealib 1.4.15 h02ce806_1 conda-forge krb5 1.19.3 hf9b2bbe_0 conda-forge lame 3.100 h27ca646_1001 conda-forge lcms2 2.12 had6a04f_0 conda-forge lerc 4.0.0 h9a09cb3_0 conda-forge libblas 3.9.0 16_osxarm64_openblas conda-forge libcblas 3.9.0 16_osxarm64_openblas conda-forge libccd-double 2.1 h9a09cb3_2 conda-forge libclang 14.0.6 default_h81a5282_0 conda-forge libclang13 14.0.6 default_he70ec0d_0 conda-forge libcurl 7.83.1 h2fcd78c_0 conda-forge libcxx 14.0.6 h2692d47_0 conda-forge libdap4 3.20.6 h8510809_2 conda-forge libdeflate 1.13 h57fd34a_0 conda-forge libedit 3.1.20191231 hc8eb9b7_2 conda-forge libev 4.33 h642e427_1 conda-forge libffi 3.4.2 h3422bc3_5 conda-forge libgd 2.3.3 hede1055_3 conda-forge libgdal 3.5.1 he1a18a7_5 conda-forge libgfortran 5.0.0 11_3_0_hd922786_25 conda-forge libgfortran5 11.3.0 hdaf2cc0_25 conda-forge libglib 2.72.1 ha1047ec_0 conda-forge libiconv 1.16 h642e427_0 conda-forge libidn2 2.3.3 he4db4b2_0 conda-forge libignition-cmake2 2.15.0 hb7217d7_0 conda-forge libignition-common3 3.13.2 ha785882_3 conda-forge libignition-fuel-tools4 4.4.0 ha52498d_8 conda-forge libignition-math6 6.11.0 py310h520f069_1 conda-forge libignition-msgs5 5.9.0 hd2c25e4_1 conda-forge libignition-tools1 1.5.0 h05620d7_0 conda-forge libignition-transport8 8.3.0 h9e26ccd_1 conda-forge libkml 1.3.0 h893ab4d_1014 conda-forge liblapack 3.9.0 16_osxarm64_openblas conda-forge libllvm14 14.0.6 h37c5ba8_0 conda-forge libnetcdf 4.8.1 nompi_h996a5af_104 conda-forge libnghttp2 1.47.0 h232270b_1 conda-forge libode 0.16.2 py310h1105856_10 conda-forge libogg 1.3.4 h27ca646_1 conda-forge libopenblas 0.3.21 openmp_hc731615_3 conda-forge libopus 1.3.1 h27ca646_1 conda-forge libpng 1.6.37 h9b2ccdc_4 conda-forge libpq 14.5 hb2ab832_0 conda-forge libprotobuf 3.21.5 hb5ab8b9_2 conda-forge libraw 0.20.2 h9166135_1 conda-forge librsvg 2.54.4 ha2634a2_0 conda-forge librttopo 1.1.0 h275bb25_11 conda-forge libsdformat 9.8.0 hb3dc90a_2 conda-forge libsodium 1.0.18 h27ca646_1 conda-forge libspatialite 5.0.1 h47b1232_18 conda-forge libsqlite 3.39.3 h76d750c_0 conda-forge libssh2 1.10.0 hb80f160_3 conda-forge libtar 1.2.20 h3422bc3_1004 conda-forge libtasn1 4.19.0 h1a8c8d9_0 conda-forge libtiff 4.4.0 hd6ca8d7_3 conda-forge libtool 2.4.6 hbdafb3b_1008 conda-forge libunistring 0.9.10 h3422bc3_0 conda-forge libusb 1.0.26 h1c322ee_100 conda-forge libvorbis 1.3.7 h9f76cd9_0 conda-forge libvpx 1.11.0 hc470f4d_3 conda-forge libwebp 1.2.4 h328b37c_0 conda-forge libwebp-base 1.2.4 h57fd34a_0 conda-forge libxcb 1.13 h9b22ae9_1004 conda-forge libxml2 2.9.14 h9d8dfc2_4 conda-forge libzip 1.9.2 h96606af_1 conda-forge libzlib 1.2.12 ha287fd2_2 conda-forge llvm-openmp 14.0.4 hd125106_0 conda-forge lz4-c 1.9.3 hbdafb3b_1 conda-forge mysql-common 8.0.30 hab468bb_1 conda-forge mysql-libs 8.0.30 hea58576_1 conda-forge ncurses 6.3 h07bb92c_1 conda-forge nettle 3.8.1 h63371fa_1 conda-forge nspr 4.32 hbdafb3b_1 conda-forge nss 3.78 h1483a63_0 conda-forge numpy 1.23.2 py310h127c7cf_0 conda-forge octomap 1.9.7 hc021e02_0 conda-forge ogre 1.10.12 h5654cb5_9 conda-forge openal-soft 1.22.2 hf86a087_0 conda-forge openexr 3.1.5 h264c651_0 conda-forge openh264 2.3.0 h9a09cb3_0 conda-forge openjpeg 2.5.0 h5d4e404_1 conda-forge openssl 1.1.1q ha287fd2_0 conda-forge p11-kit 0.24.1 h29577a5_0 conda-forge pango 1.50.9 hc1f5a69_0 conda-forge pcre 8.45 hbdafb3b_0 conda-forge pip 22.2.2 pyhd8ed1ab_0 conda-forge pixman 0.40.0 h27ca646_0 conda-forge poppler 22.04.0 h2eb88e3_2 conda-forge poppler-data 0.4.11 hd8ed1ab_0 conda-forge postgresql 14.5 hb0ca4ee_0 conda-forge proj 9.0.1 h4c79c2b_1 conda-forge pthread-stubs 0.4 h27ca646_1001 conda-forge pugixml 1.11.4 hbdafb3b_0 conda-forge pybind11-abi 4 hd8ed1ab_3 conda-forge python 3.10.6 hbce4517_0_cpython conda-forge python_abi 3.10 2_cp310 conda-forge qt-main 5.15.4 haf604a7_2 conda-forge qwt 6.2.0 h52c5239_4 conda-forge readline 8.1.2 h46ed386_0 conda-forge ruby 3.1.2 h462d72a_0 conda-forge sdl2 2.0.22 h9a09cb3_2 conda-forge setuptools 65.3.0 pyhd8ed1ab_1 conda-forge simbody 3.7 h4b178c3_3 conda-forge snappy 1.1.9 h39c3846_1 conda-forge sqlite 3.39.3 h2229b38_0 conda-forge svt-av1 1.2.1 he23bcac_0 conda-forge swig 4.0.2 hc25a523_2 conda-forge tbb 2021.5.0 hffc8910_2 conda-forge tbb-devel 2021.5.0 hffc8910_2 conda-forge tiledb 2.11.1 hc7ac4c9_0 conda-forge tinyxml 2.6.2 h260d524_2 conda-forge tinyxml2 9.0.0 hbdafb3b_2 conda-forge tk 8.6.12 he1e0b03_0 conda-forge tzcode 2022c h57fd34a_0 conda-forge tzdata 2022c h191b570_0 conda-forge urdfdom 3.1.0 h19b2bf3_1 conda-forge urdfdom_headers 1.1.0 hf86a087_0 conda-forge wheel 0.37.1 pyhd8ed1ab_0 conda-forge x264 1!164.3095 h57fd34a_2 conda-forge x265 3.5 hbc6ce65_3 conda-forge xerces-c 3.2.3 h1b0b642_5 conda-forge xorg-fixesproto 5.0 h3422bc3_1002 conda-forge xorg-kbproto 1.0.7 h27ca646_1002 conda-forge xorg-libice 1.0.10 h27ca646_0 conda-forge xorg-libsm 1.2.3 h27ca646_1000 conda-forge xorg-libx11 1.7.2 h3422bc3_0 conda-forge xorg-libxau 1.0.9 h27ca646_0 conda-forge xorg-libxaw 1.0.14 h3422bc3_1 conda-forge xorg-libxdmcp 1.1.3 h27ca646_0 conda-forge xorg-libxext 1.3.4 h27ca646_1 conda-forge xorg-libxfixes 5.0.3 h3422bc3_1004 conda-forge xorg-libxmu 1.1.3 h3422bc3_0 conda-forge xorg-libxpm 3.5.13 h3422bc3_0 conda-forge xorg-libxrender 0.9.10 h27ca646_1003 conda-forge xorg-libxt 1.2.1 h27ca646_2 conda-forge xorg-renderproto 0.11.1 h27ca646_1002 conda-forge xorg-xextproto 7.3.0 h27ca646_1002 conda-forge xorg-xproto 7.0.31 h27ca646_1007 conda-forge xz 5.2.6 h57fd34a_0 conda-forge yaml 0.2.5 h3422bc3_2 conda-forge zeromq 4.3.4 hbdafb3b_1 conda-forge zlib 1.2.12 ha287fd2_2 conda-forge zstd 1.5.2 h8128057_4 conda-forge zziplib 0.13.69 he1e0b03_1 conda-forge ~~~
nunoguedelha commented 2 years ago

My setup information...

Conda info and setup from an environment where Gazebo (11.9.0) is working:

$ conda info ```bash active environment : robotologydeps active env location : /Users/nunoguedelha/miniforge3/envs/robotologydeps shell level : 1 user config file : /Users/nunoguedelha/.condarc populated config files : /Users/nunoguedelha/miniforge3/.condarc /Users/nunoguedelha/.condarc conda version : 4.14.0 conda-build version : not installed python version : 3.8.12.final.0 virtual packages : __osx=10.15.7=0 __unix=0=0 __archspec=1=x86_64 base environment : /Users/nunoguedelha/miniforge3 (writable) conda av data dir : /Users/nunoguedelha/miniforge3/etc/conda conda av metadata url : None channel URLs : https://conda.anaconda.org/conda-forge/osx-64 https://conda.anaconda.org/conda-forge/noarch https://repo.anaconda.com/pkgs/main/osx-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/osx-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /Users/nunoguedelha/miniforge3/pkgs /Users/nunoguedelha/.conda/pkgs envs directories : /Users/nunoguedelha/miniforge3/envs /Users/nunoguedelha/.conda/envs platform : osx-64 user-agent : conda/4.14.0 requests/2.28.1 CPython/3.8.12 Darwin/19.6.0 OSX/10.15.7 UID:GID : 501:20 netrc file : None offline mode : False ```
$ conda list ```bash # packages in environment at /Users/nunoguedelha/miniforge3/envs/robotologydeps: # # Name Version Build Channel ace 7.0.6 he49afe7_0 conda-forge ampl-mp 3.1.0 h2beb688_1005 conda-forge aom 3.2.0 he49afe7_2 conda-forge asio 1.14.1 he49afe7_1 conda-forge assimp 5.0.1 h1224e73_7 conda-forge atk-1.0 2.36.0 he69c4ee_4 conda-forge boost 1.74.0 py39ha1f3e3e_4 conda-forge boost-cpp 1.74.0 hff03dee_4 conda-forge bullet-cpp 3.17 h428e3ee_1 conda-forge bzip2 1.0.8 h0d85af4_4 conda-forge c-ares 1.18.1 h0d85af4_0 conda-forge c-compiler 1.3.0 h0d85af4_0 conda-forge ca-certificates 2021.10.8 h033912b_0 conda-forge cairo 1.16.0 he43a7df_1008 conda-forge cctools 973.0.1 hd9211c8_5 conda-forge cctools_osx-64 973.0.1 hb41342b_5 conda-forge cfitsio 4.0.0 hb20e66c_0 conda-forge clang 11.1.0 h694c41f_1 conda-forge clang-11 11.1.0 default_he082bbe_1 conda-forge clang_osx-64 11.1.0 hc8532ff_6 conda-forge clangxx 11.1.0 default_he082bbe_1 conda-forge clangxx_osx-64 11.1.0 h2c55bc3_6 conda-forge cmake 3.21.3 hdbd2f3e_0 conda-forge compiler-rt 11.1.0 h654b07c_0 conda-forge compiler-rt_osx-64 11.1.0 h8c5fa43_0 conda-forge compilers 1.3.0 h694c41f_0 conda-forge console_bridge 1.0.1 h65a07b1_0 conda-forge cppzmq 4.8.1 hf09c4ce_0 conda-forge curl 7.81.0 hf45b732_0 conda-forge cxx-compiler 1.3.0 h940c156_0 conda-forge dartsim 6.10.1 h110914a_1 conda-forge eigen 3.4.0 h940c156_0 conda-forge expat 2.4.3 he49afe7_0 conda-forge fcl 0.6.1 h31ff308_3 conda-forge ffmpeg 4.4.1 h79e7b16_0 conda-forge flann 1.9.1 h30321d8_1009 conda-forge font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge font-ttf-inconsolata 3.000 h77eed37_0 conda-forge font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge font-ttf-ubuntu 0.83 hab24e00_0 conda-forge fontconfig 2.13.94 h10f422b_0 conda-forge fonts-conda-ecosystem 1 0 conda-forge fonts-conda-forge 1 0 conda-forge fortran-compiler 1.3.0 h6818c3e_0 conda-forge freeimage 3.18.0 h7d96ac2_7 conda-forge freetype 2.10.4 h4cff582_1 conda-forge freexl 1.0.6 h0d85af4_0 conda-forge fribidi 1.0.10 hbcb3906_0 conda-forge gazebo 11.9.0 h4f5c2f8_1 conda-forge gdbm 1.18 h8a0c380_2 conda-forge gdk-pixbuf 2.42.6 h2e6141f_0 conda-forge geos 3.10.0 he49afe7_0 conda-forge geotiff 1.7.0 hb0faedc_3 conda-forge gettext 0.19.8.1 hd1a6beb_1008 conda-forge gfortran 9.3.0 h768ea0c_15 conda-forge gfortran_impl_osx-64 9.3.0 h9cc0e5e_23 conda-forge gfortran_osx-64 9.3.0 h18f7dce_15 conda-forge giflib 5.2.1 hbcb3906_2 conda-forge glew 2.1.0 h046ec9c_2 conda-forge glfw 3.3.6 h0d85af4_0 conda-forge gmp 6.2.1 h2e338ed_0 conda-forge gnutls 3.6.13 h756fd2b_1 conda-forge graphite2 1.3.13 h2e338ed_1001 conda-forge graphviz 2.50.0 h77de9ca_1 conda-forge gsl 2.7 h93259b0_0 conda-forge gtk2 2.24.33 h675d97a_1 conda-forge gts 0.7.6 hccb3bdf_2 conda-forge harfbuzz 3.1.1 h159f659_0 conda-forge hdf4 4.2.15 hefd3b78_3 conda-forge hdf5 1.12.1 nompi_h2f0ef1a_103 conda-forge icu 68.2 he49afe7_0 conda-forge ilmbase 2.5.5 hfab91a5_0 conda-forge ipopt 3.14.4 hc501a57_0 conda-forge irrlicht 1.8.5 hebf3676_0 conda-forge isl 0.22.1 hb1e8313_2 conda-forge jasper 2.0.33 h013e400_0 conda-forge jbig 2.1 h0d85af4_2003 conda-forge jpeg 9d hbcb3906_0 conda-forge json-c 0.15 hcb556a6_0 conda-forge jsoncpp 1.9.4 h940c156_3 conda-forge jxrlib 1.1 h35c211d_2 conda-forge kealib 1.4.14 ha22a8b1_3 conda-forge krb5 1.19.2 hcfbf3a7_3 conda-forge lame 3.100 h35c211d_1001 conda-forge lcms2 2.12 h577c468_0 conda-forge ld64 609 hd2e7500_5 conda-forge ld64_osx-64 609 h6adca69_5 conda-forge lerc 3.0 he49afe7_0 conda-forge libblas 3.9.0 13_osx64_openblas conda-forge libcblas 3.9.0 13_osx64_openblas conda-forge libccd 2.1 he49afe7_1 conda-forge libclang 11.1.0 default_he082bbe_1 conda-forge libclang-cpp11.1 11.1.0 default_he082bbe_1 conda-forge libcurl 7.81.0 hf45b732_0 conda-forge libcxx 12.0.1 habf9029_1 conda-forge libdap4 3.20.6 h3e144a0_2 conda-forge libdeflate 1.8 h0d85af4_0 conda-forge libedit 3.1.20191231 h0678c8f_2 conda-forge libev 4.33 haf1e3a3_1 conda-forge libffi 3.4.2 h0d85af4_5 conda-forge libgd 2.3.3 h311d3fc_0 conda-forge libgdal 3.3.3 h19466b5_2 conda-forge libgfortran 5.0.0 9_3_0_h6c81a4c_23 conda-forge libgfortran-devel_osx-64 9.3.0 h6c81a4c_23 conda-forge libgfortran5 9.3.0 h6c81a4c_23 conda-forge libglib 2.70.2 hf1fb8c0_1 conda-forge libiconv 1.16 haf1e3a3_0 conda-forge libignition-cmake2 2.10.0 he49afe7_0 conda-forge libignition-common3 3.13.2 h39c3357_1 conda-forge libignition-fuel-tools4 4.4.0 h57fa89f_2 conda-forge libignition-math6 6.9.2 hcd9eead_0 conda-forge libignition-msgs5 5.7.0 hfb7e794_1 conda-forge libignition-tools1 1.4.1 hcdefd0e_2 conda-forge libignition-transport8 8.1.0 h9cfb28a_8 conda-forge libjpeg-turbo 2.1.1 h0d85af4_0 conda-forge libkml 1.3.0 h8fd9edb_1014 conda-forge liblapack 3.9.0 13_osx64_openblas conda-forge liblapacke 3.9.0 13_osx64_openblas conda-forge libllvm11 11.1.0 hd011deb_2 conda-forge libmatio 1.5.21 h9143e3d_1 conda-forge libnetcdf 4.8.1 nompi_h6609ca0_101 conda-forge libnghttp2 1.43.0 h6f36284_1 conda-forge libode 0.16.2 h9fcab8e_9 conda-forge libopenblas 0.3.18 openmp_h3351f45_0 conda-forge libopencv 4.5.3 py39hd2a74c5_5 conda-forge libpng 1.6.37 h7cec526_2 conda-forge libpq 13.5 hea3049e_1 conda-forge libprotobuf 3.18.1 hcf210ce_0 conda-forge libraw 0.20.2 hefd3b78_1 conda-forge librsvg 2.52.5 h02b643e_1 conda-forge librttopo 1.1.0 heff5c8b_7 conda-forge libsdformat 9.3.0 h6955478_5 conda-forge libsodium 1.0.18 hbcb3906_1 conda-forge libspatialite 5.0.1 h33554e5_10 conda-forge libssh2 1.10.0 h52ee1ee_2 conda-forge libtar 1.2.20 h0d85af4_1004 conda-forge libtiff 4.3.0 hd146c10_2 conda-forge libtool 2.4.6 he49afe7_1008 conda-forge libusb 1.0.24 h0d85af4_105 conda-forge libuv 1.43.0 h0d85af4_0 conda-forge libvpx 1.11.0 he49afe7_3 conda-forge libwebp 1.2.2 h28dabe5_0 conda-forge libwebp-base 1.2.2 h0d85af4_1 conda-forge libxcb 1.13 h0d85af4_1004 conda-forge libxml2 2.9.12 h93ec3fd_0 conda-forge libzip 1.8.0 h8b0c345_1 conda-forge libzlib 1.2.11 h9173be1_1013 conda-forge llvm-openmp 12.0.1 hda6cdc1_1 conda-forge llvm-tools 11.1.0 hd011deb_2 conda-forge lua 5.4.4 hf9dbe3d_0 conda-forge lz4-c 1.9.3 he49afe7_1 conda-forge make 4.3 h22f3db7_1 conda-forge metis 5.1.0 h2e338ed_1006 conda-forge mpc 1.2.1 hbb51d92_0 conda-forge mpfr 4.1.0 h0f52abe_1 conda-forge mumps-include 5.2.1 h694c41f_10 conda-forge mumps-seq 5.2.1 h805a9e9_10 conda-forge mysql-common 8.0.28 h694c41f_0 conda-forge mysql-libs 8.0.28 h115446f_0 conda-forge ncurses 6.3 he49afe7_0 conda-forge nettle 3.6 hedd7734_0 conda-forge ninja 1.10.2 h940c156_1 conda-forge nlohmann_json 3.10.5 he49afe7_0 conda-forge nspr 4.32 hcd9eead_1 conda-forge nss 3.74 h31e2bf1_0 conda-forge numpy 1.22.1 py39h9d9ce41_0 conda-forge octomap 1.9.7 h940c156_0 conda-forge ogre 1.10.12 hefd5428_7 conda-forge openal-soft 1.21.1 h940c156_0 conda-forge opencv 4.5.3 py39h6e9494a_5 conda-forge openexr 2.5.5 h7fa7ffa_0 conda-forge openh264 2.1.1 hfd3ada9_0 conda-forge openjpeg 2.4.0 h6e7aa92_1 conda-forge openssl 1.1.1l h0d85af4_0 conda-forge pango 1.48.10 h056538c_2 conda-forge pcre 8.45 he49afe7_0 conda-forge pip 21.3.1 pyhd8ed1ab_0 conda-forge pixman 0.40.0 hbcb3906_0 conda-forge pkg-config 0.29.2 h31203cd_1008 conda-forge poppler 21.09.0 h9573804_3 conda-forge poppler-data 0.4.11 hd8ed1ab_0 conda-forge portaudio 19.6.0 he49afe7_4 conda-forge postgresql 13.5 he8fe76e_1 conda-forge proj 8.1.1 h1512c50_2 conda-forge pthread-stubs 0.4 hc929b4f_1001 conda-forge pugixml 1.11.4 he49afe7_0 conda-forge py-opencv 4.5.3 py39h71a6800_5 conda-forge python 3.9.9 h1248fe1_0_cpython conda-forge python_abi 3.9 2_cp39 conda-forge qt 5.12.9 h126340a_4 conda-forge qwt 6.2.0 h3050948_0 conda-forge readline 8.1 h05e3726_0 conda-forge rhash 1.4.1 h35c211d_0 conda-forge ruby 3.1.0 hed99dc5_1 conda-forge scotch 6.0.9 h9f43b6f_1 conda-forge sdl 1.2.15 he49afe7_1 conda-forge sdl2 2.0.18 he49afe7_0 conda-forge setuptools 60.5.0 py39h6e9494a_0 conda-forge sigtool 0.1.2 h504443f_1 conda-forge simbody 3.7 h43072b6_3 conda-forge spdlog 1.9.2 h940c156_0 conda-forge sqlite 3.37.0 h23a322b_0 conda-forge svt-av1 0.9.0 he49afe7_0 conda-forge swig 4.0.2 hce5123c_2 conda-forge tapi 1100.0.11 h9ce4665_0 conda-forge tbb 2020.2 h940c156_4 conda-forge tbb-devel 2020.2 h940c156_4 conda-forge tiledb 2.3.4 h8370e7a_0 conda-forge tinyxml 2.6.2 h65a07b1_2 conda-forge tinyxml2 9.0.0 he49afe7_2 conda-forge tk 8.6.11 h5dbffcc_1 conda-forge tzcode 2021e h0d85af4_0 conda-forge tzdata 2021e he74cb21_0 conda-forge urdfdom 2.3.5 h940c156_0 conda-forge urdfdom_headers 1.0.5 h940c156_2 conda-forge wheel 0.37.1 pyhd8ed1ab_0 conda-forge x264 1!161.3030 h0d85af4_1 conda-forge x265 3.5 h940c156_1 conda-forge xerces-c 3.2.3 h379762d_3 conda-forge xorg-fixesproto 5.0 h0d85af4_1002 conda-forge xorg-kbproto 1.0.7 h35c211d_1002 conda-forge xorg-libice 1.0.10 h0d85af4_0 conda-forge xorg-libsm 1.2.3 h0d85af4_1000 conda-forge xorg-libx11 1.7.2 h0d85af4_0 conda-forge xorg-libxau 1.0.9 h35c211d_0 conda-forge xorg-libxaw 1.0.14 h0d85af4_1 conda-forge xorg-libxdmcp 1.1.3 h35c211d_0 conda-forge xorg-libxext 1.3.4 h0d85af4_1 conda-forge xorg-libxfixes 5.0.3 h0d85af4_1004 conda-forge xorg-libxmu 1.1.3 h0d85af4_0 conda-forge xorg-libxpm 3.5.13 h0d85af4_0 conda-forge xorg-libxrender 0.9.10 h0d85af4_1003 conda-forge xorg-libxt 1.2.1 h0d85af4_2 conda-forge xorg-renderproto 0.11.1 h0d85af4_1002 conda-forge xorg-xextproto 7.3.0 h35c211d_1002 conda-forge xorg-xproto 7.0.31 h35c211d_1007 conda-forge xz 5.2.5 haf1e3a3_1 conda-forge yaml 0.2.5 h0d85af4_2 conda-forge zeromq 4.3.4 he49afe7_1 conda-forge zlib 1.2.11 h9173be1_1013 conda-forge zstd 1.5.2 h582d3a0_0 conda-forge zziplib 0.13.69 h5dbffcc_1 conda-forge ```

Conda info and setup from an environment where Gazebo (11.11.0) experiences the mentioned issue:

$ conda info ```bash active environment : robotologybin active env location : /Users/nunoguedelha/miniforge3/envs/robotologybin shell level : 1 user config file : /Users/nunoguedelha/.condarc populated config files : /Users/nunoguedelha/miniforge3/.condarc /Users/nunoguedelha/.condarc conda version : 4.14.0 conda-build version : not installed python version : 3.8.12.final.0 virtual packages : __osx=10.15.7=0 __unix=0=0 __archspec=1=x86_64 base environment : /Users/nunoguedelha/miniforge3 (writable) conda av data dir : /Users/nunoguedelha/miniforge3/etc/conda conda av metadata url : None channel URLs : https://conda.anaconda.org/conda-forge/osx-64 https://conda.anaconda.org/conda-forge/noarch https://repo.anaconda.com/pkgs/main/osx-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/osx-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /Users/nunoguedelha/miniforge3/pkgs /Users/nunoguedelha/.conda/pkgs envs directories : /Users/nunoguedelha/miniforge3/envs /Users/nunoguedelha/.conda/envs platform : osx-64 user-agent : conda/4.14.0 requests/2.28.1 CPython/3.8.12 Darwin/19.6.0 OSX/10.15.7 UID:GID : 501:20 netrc file : None offline mode : False ```
$ conda list ```bash # packages in environment at /Users/nunoguedelha/miniforge3/envs/robotologybin: # # Name Version Build Channel ace 7.0.8 hb486fe8_0 conda-forge ampl-mp 3.1.0 h2beb688_1006 conda-forge aom 3.4.0 hb486fe8_1 conda-forge appnope 0.1.3 pyhd8ed1ab_0 conda-forge assimp 5.2.4 hfcdac6d_0 conda-forge asttokens 2.0.8 pyhd8ed1ab_0 conda-forge atk-1.0 2.36.0 he69c4ee_4 conda-forge backcall 0.2.0 pyh9f0ad1d_0 conda-forge backports 1.0 py_2 conda-forge backports.functools_lru_cache 1.6.4 pyhd8ed1ab_0 conda-forge blosc 1.21.1 h97e831e_3 conda-forge boost-cpp 1.74.0 h8b082ac_8 conda-forge brotlipy 0.7.0 py310h1961e1f_1004 conda-forge bullet-cpp 3.21 hffb3ee9_3 conda-forge bzip2 1.0.8 h0d85af4_4 conda-forge c-ares 1.18.1 h0d85af4_0 conda-forge ca-certificates 2022.6.15 h033912b_0 conda-forge cairo 1.16.0 h904041c_1013 conda-forge certifi 2022.6.15 pyhd8ed1ab_1 conda-forge cffi 1.15.1 py310h96bbf6e_0 conda-forge cfitsio 4.1.0 h2c97ad1_0 conda-forge charset-normalizer 2.1.1 pyhd8ed1ab_0 conda-forge colorama 0.4.5 pyhd8ed1ab_0 conda-forge conda 4.14.0 py310h2ec42d9_0 conda-forge conda-package-handling 1.8.1 py310h1961e1f_1 conda-forge console_bridge 1.0.2 hbb4e6a2_1 conda-forge cppzmq 4.8.1 hf09c4ce_0 conda-forge cryptography 37.0.4 py310h52c3658_0 conda-forge curl 7.83.1 h372c54d_0 conda-forge dartsim 6.12.2 h6e96ea7_1 conda-forge decorator 5.1.1 pyhd8ed1ab_0 conda-forge eigen 3.4.0 h940c156_0 conda-forge executing 1.0.0 pyhd8ed1ab_0 conda-forge expat 2.4.8 h96cf925_0 conda-forge fcl 0.7.0 h8984607_1 conda-forge ffmpeg 4.4.2 gpl_h5a1d76f_107 conda-forge flann 1.9.1 h30321d8_1010 conda-forge font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge font-ttf-inconsolata 3.000 h77eed37_0 conda-forge font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge font-ttf-ubuntu 0.83 hab24e00_0 conda-forge fontconfig 2.14.0 h676cef8_0 conda-forge fonts-conda-ecosystem 1 0 conda-forge fonts-conda-forge 1 0 conda-forge freeimage 3.18.0 h33ef725_9 conda-forge freetype 2.12.1 h3f81eb7_0 conda-forge freexl 1.0.6 h0d85af4_0 conda-forge fribidi 1.0.10 hbcb3906_0 conda-forge gazebo 11.11.0 hb2664c6_9 conda-forge gazebo-yarp-plugins 4.5.0 h468448e_64 robotology gdbm 1.18 h8a0c380_2 conda-forge gdk-pixbuf 2.42.8 hb161b9c_0 conda-forge geos 3.11.0 hb486fe8_0 conda-forge geotiff 1.7.1 ha1a2aeb_3 conda-forge gettext 0.19.8.1 hd1a6beb_1008 conda-forge giflib 5.2.1 hbcb3906_2 conda-forge glib 2.72.1 h2292cb8_0 conda-forge glib-tools 2.72.1 h2292cb8_0 conda-forge gmp 6.2.1 h2e338ed_0 conda-forge gnutls 3.7.7 h047ecf1_0 conda-forge graphite2 1.3.13 h2e338ed_1001 conda-forge graphviz 5.0.0 ha5baa68_0 conda-forge gsl 2.7 h93259b0_0 conda-forge gst-plugins-base 1.20.3 h37e1711_1 conda-forge gstreamer 1.20.3 h1d18e73_1 conda-forge gtk2 2.24.33 h7c1209e_2 conda-forge gts 0.7.6 hccb3bdf_2 conda-forge harfbuzz 4.4.1 h00bb2c2_0 conda-forge hdf4 4.2.15 h0623a88_4 conda-forge hdf5 1.12.1 nompi_ha60fbc9_104 conda-forge icu 70.1 h96cf925_0 conda-forge icub-firmware-shared 1.25.1 h86cced9_64 robotology icub-main 1.26.1 py310h522bd16_64 robotology icub-models 1.25.0 py310h7a76584_0 conda-forge idna 3.3 pyhd8ed1ab_0 conda-forge idyntree 6.1.0 py310h4d6e4a1_1 conda-forge imath 3.1.5 hd9580d2_0 conda-forge ipopt 3.14.8 h7276238_0 conda-forge ipython 8.5.0 pyhd1c38e8_1 conda-forge irrlicht 1.8.5 he00d70a_2 conda-forge jasper 2.0.33 h013e400_0 conda-forge jedi 0.18.1 pyhd8ed1ab_2 conda-forge jpeg 9e hac89ed1_2 conda-forge json-c 0.16 h01d06f9_0 conda-forge jsoncpp 1.9.5 h940c156_1 conda-forge jxrlib 1.1 h35c211d_2 conda-forge kealib 1.4.15 h4dab1bc_0 conda-forge krb5 1.19.3 hb49756b_0 conda-forge lame 3.100 h35c211d_1001 conda-forge lcms2 2.12 h577c468_0 conda-forge lerc 4.0.0 hb486fe8_0 conda-forge libarchive 3.5.2 hde4784d_3 conda-forge libblas 3.9.0 16_osx64_openblas conda-forge libcblas 3.9.0 16_osx64_openblas conda-forge libccd-double 2.1 hb486fe8_3 conda-forge libclang 14.0.6 default_h55ffa42_0 conda-forge libclang13 14.0.6 default_hb5731bd_0 conda-forge libcurl 7.83.1 h372c54d_0 conda-forge libcxx 14.0.6 hccf4f1f_0 conda-forge libdap4 3.20.6 h3e144a0_2 conda-forge libdeflate 1.13 h775f41a_0 conda-forge libedit 3.1.20191231 h0678c8f_2 conda-forge libev 4.33 haf1e3a3_1 conda-forge libffi 3.4.2 h0d85af4_5 conda-forge libgd 2.3.3 h1e214de_3 conda-forge libgdal 3.5.1 h242d4e5_1 conda-forge libgfortran 5.0.0 10_4_0_h97931a8_25 conda-forge libgfortran5 11.3.0 h082f757_25 conda-forge libglib 2.72.1 hfbcb929_0 conda-forge libiconv 1.16 haf1e3a3_0 conda-forge libidn2 2.3.3 hac89ed1_0 conda-forge libignition-cmake2 2.15.0 hf0c8a7f_0 conda-forge libignition-common3 3.13.2 h9894a04_3 conda-forge libignition-fuel-tools4 4.4.0 h3729179_7 conda-forge libignition-math6 6.11.0 py310h9fb7402_1 conda-forge libignition-msgs5 5.9.0 h74ffcae_0 conda-forge libignition-tools1 1.5.0 hd8dcec6_0 conda-forge libignition-transport8 8.1.0 hb5b35ad_11 conda-forge libkml 1.3.0 h8fd9edb_1014 conda-forge liblapack 3.9.0 16_osx64_openblas conda-forge liblapacke 3.9.0 16_osx64_openblas conda-forge libllvm14 14.0.6 h41df66c_0 conda-forge libmamba 0.25.0 h3ac2a45_2 conda-forge libmambapy 0.25.0 py310h1dc8da7_2 conda-forge libnetcdf 4.8.1 nompi_h6609ca0_102 conda-forge libnghttp2 1.47.0 h7cbc4dc_1 conda-forge libode 0.16.2 h9d931ec_10 conda-forge libogg 1.3.4 h35c211d_1 conda-forge libopenblas 0.3.21 openmp_h429af6e_3 conda-forge libopencv 4.5.5 py38he6c0e75_13 conda-forge libopus 1.3.1 hc929b4f_1 conda-forge libosqp 0.6.2 he49afe7_3 conda-forge libpng 1.6.37 h5481273_4 conda-forge libpq 14.5 h76c7896_0 conda-forge libprotobuf 3.20.1 hbc0c0cd_3 conda-forge libraw 0.20.2 hefd3b78_1 conda-forge librsvg 2.54.4 h3d48ba6_0 conda-forge librttopo 1.1.0 he07d8f5_11 conda-forge libsdformat 9.8.0 h36e5baf_2 conda-forge libsodium 1.0.18 hbcb3906_1 conda-forge libsolv 0.7.22 hd9580d2_0 conda-forge libspatialite 5.0.1 hdbf6ee6_18 conda-forge libsqlite 3.39.3 ha978bb4_0 conda-forge libssh2 1.10.0 h7535e13_3 conda-forge libtar 1.2.20 h0d85af4_1004 conda-forge libtasn1 4.19.0 hb7f2c08_0 conda-forge libtiff 4.4.0 h5e0c7b4_3 conda-forge libtool 2.4.6 he49afe7_1008 conda-forge libunistring 0.9.10 h0d85af4_0 conda-forge libusb 1.0.26 hc2f2c32_100 conda-forge libvorbis 1.3.7 h046ec9c_0 conda-forge libvpx 1.11.0 he49afe7_3 conda-forge libwebp 1.2.4 hfa4350a_0 conda-forge libwebp-base 1.2.4 h775f41a_0 conda-forge libxcb 1.13 h0d85af4_1004 conda-forge libxml2 2.9.14 hea49891_4 conda-forge libzip 1.9.2 h3ad4413_1 conda-forge libzlib 1.2.12 hfe4f2af_2 conda-forge llvm-openmp 14.0.4 ha654fa7_0 conda-forge lz4-c 1.9.3 he49afe7_1 conda-forge lzo 2.10 haf1e3a3_1000 conda-forge mamba 0.25.0 py310h795411f_2 conda-forge matplotlib-inline 0.1.6 pyhd8ed1ab_0 conda-forge meshcat-python 0.3.2 pyhd8ed1ab_0 conda-forge metis 5.1.0 h2e338ed_1006 conda-forge mumps-include 5.2.1 h694c41f_11 conda-forge mumps-seq 5.2.1 hea8e22a_11 conda-forge mysql-common 8.0.30 h7ebae80_1 conda-forge mysql-libs 8.0.30 hc37e033_1 conda-forge ncurses 6.3 h96cf925_1 conda-forge nettle 3.8.1 h96f3785_1 conda-forge nspr 4.32 hcd9eead_1 conda-forge nss 3.78 ha8197d3_0 conda-forge numpy 1.23.2 py310hf910466_0 conda-forge octomap 1.9.7 h940c156_0 conda-forge ogre 1.10.12 hf9dbd05_9 conda-forge openal-soft 1.22.2 h1b54a9f_0 conda-forge openexr 3.1.5 h6fbc5c6_0 conda-forge openh264 2.3.0 hb486fe8_0 conda-forge openjpeg 2.4.0 h6e7aa92_1 conda-forge openssl 1.1.1q hfe4f2af_0 conda-forge osqp-eigen 0.7.0 he49afe7_0 conda-forge p11-kit 0.24.1 h65f8906_0 conda-forge pango 1.50.8 he3a0ff7_0 conda-forge parso 0.8.3 pyhd8ed1ab_0 conda-forge pcre 8.45 he49afe7_0 conda-forge pexpect 4.8.0 pyh9f0ad1d_2 conda-forge pickleshare 0.7.5 py_1003 conda-forge pillow 9.2.0 py310h484cba3_1 conda-forge pip 22.2.2 pyhd8ed1ab_0 conda-forge pixman 0.40.0 hbcb3906_0 conda-forge poppler 22.04.0 hed6754a_1 conda-forge poppler-data 0.4.11 hd8ed1ab_0 conda-forge portaudio 19.6.0 hf0c8a7f_6 conda-forge postgresql 14.5 h6af9f65_0 conda-forge proj 9.0.1 h05f0992_1 conda-forge prompt-toolkit 3.0.31 pyha770c72_0 conda-forge pthread-stubs 0.4 hc929b4f_1001 conda-forge ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge pugixml 1.11.4 he49afe7_0 conda-forge pure_eval 0.2.2 pyhd8ed1ab_0 conda-forge pybind11-abi 4 hd8ed1ab_3 conda-forge pycosat 0.6.3 py310h1961e1f_1010 conda-forge pycparser 2.21 pyhd8ed1ab_0 conda-forge pygments 2.13.0 pyhd8ed1ab_0 conda-forge pyngrok 5.1.0 pyhd8ed1ab_0 conda-forge pyopenssl 22.0.0 pyhd8ed1ab_0 conda-forge pysocks 1.7.1 pyha2e5f31_6 conda-forge python 3.10.6 ha7b0be1_0_cpython conda-forge python_abi 3.10 2_cp310 conda-forge pyyaml 6.0 py310h1961e1f_4 conda-forge pyzmq 23.2.1 py310hcabbbd4_0 conda-forge qt-main 5.15.4 h938c29d_2 conda-forge qwt 6.2.0 h4cc5820_4 conda-forge readline 8.1.2 h3899abd_0 conda-forge reproc 14.2.3 h0d85af4_0 conda-forge reproc-cpp 14.2.3 he49afe7_0 conda-forge requests 2.28.1 pyhd8ed1ab_1 conda-forge robot-testing-framework 2.0.1 hb486fe8_0 conda-forge ruamel_yaml 0.15.80 py310h6c45266_1007 conda-forge ruby 3.1.2 h586acb3_0 conda-forge scotch 6.0.9 h3da7401_2 conda-forge sdl 1.2.52 h96cf925_1 conda-forge sdl2 2.0.22 hb486fe8_2 conda-forge setuptools 65.3.0 pyhd8ed1ab_1 conda-forge simbody 3.7 h43072b6_3 conda-forge six 1.16.0 pyh6c4a22f_0 conda-forge snappy 1.1.9 h6e38e02_1 conda-forge soxr 0.1.3 had99412_2 conda-forge sqlite 3.39.3 h9ae0607_0 conda-forge stack_data 0.5.0 pyhd8ed1ab_0 conda-forge svt-av1 1.2.1 hbbd2c75_0 conda-forge swig 4.0.2 hce5123c_2 conda-forge tbb 2021.5.0 hbb4e6a2_1 conda-forge tbb-devel 2021.5.0 hbb4e6a2_1 conda-forge tiledb 2.9.5 hb1ce2c0_0 conda-forge tinyxml 2.6.2 h65a07b1_2 conda-forge tinyxml2 9.0.0 he49afe7_2 conda-forge tk 8.6.12 h5dbffcc_0 conda-forge toolz 0.12.0 pyhd8ed1ab_0 conda-forge tornado 6.2 py310h6c45266_0 conda-forge tqdm 4.64.1 pyhd8ed1ab_0 conda-forge traitlets 5.3.0 pyhd8ed1ab_0 conda-forge tzcode 2022c h775f41a_0 conda-forge tzdata 2022c h191b570_0 conda-forge u-msgpack-python 2.7.1 pyh9f0ad1d_0 conda-forge unixodbc 2.3.10 h7b58acd_0 conda-forge urdfdom 3.1.0 hd1da41a_1 conda-forge urdfdom_headers 1.1.0 h1b54a9f_0 conda-forge urllib3 1.26.11 pyhd8ed1ab_0 conda-forge wcwidth 0.2.5 pyh9f0ad1d_2 conda-forge wheel 0.37.1 pyhd8ed1ab_0 conda-forge whole-body-estimators 0.8.0 h86cced9_64 robotology x264 1!164.3095 h775f41a_2 conda-forge x265 3.5 hbb4e6a2_3 conda-forge xerces-c 3.2.3 hf5b2a72_5 conda-forge xorg-fixesproto 5.0 h0d85af4_1002 conda-forge xorg-kbproto 1.0.7 h35c211d_1002 conda-forge xorg-libice 1.0.10 h0d85af4_0 conda-forge xorg-libsm 1.2.3 h0d85af4_1000 conda-forge xorg-libx11 1.7.2 h0d85af4_0 conda-forge xorg-libxau 1.0.9 h35c211d_0 conda-forge xorg-libxaw 1.0.14 h0d85af4_1 conda-forge xorg-libxdmcp 1.1.3 h35c211d_0 conda-forge xorg-libxext 1.3.4 h0d85af4_1 conda-forge xorg-libxfixes 5.0.3 h0d85af4_1004 conda-forge xorg-libxmu 1.1.3 h0d85af4_0 conda-forge xorg-libxpm 3.5.13 h0d85af4_0 conda-forge xorg-libxrender 0.9.10 h0d85af4_1003 conda-forge xorg-libxt 1.2.1 h0d85af4_2 conda-forge xorg-renderproto 0.11.1 h0d85af4_1002 conda-forge xorg-xextproto 7.3.0 h35c211d_1002 conda-forge xorg-xproto 7.0.31 h35c211d_1007 conda-forge xz 5.2.6 h775f41a_0 conda-forge yaml 0.2.5 h0d85af4_2 conda-forge yaml-cpp 0.7.0 hb486fe8_1 conda-forge yarp 3.7.2 h694c41f_0 conda-forge yarp-cxx 3.7.2 h247d3f9_0 conda-forge yarp-python 3.7.2 py310hd4537e4_0 conda-forge ycm-cmake-modules 0.14.2 hb486fe8_0 conda-forge zeromq 4.3.4 he49afe7_1 conda-forge zlib 1.2.12 hfe4f2af_2 conda-forge zstd 1.5.2 hfa58983_4 conda-forge zziplib 0.13.69 h5dbffcc_1 conda-forge ```
nunoguedelha commented 2 years ago

I've tried to fall back to Gazebo 11.10.0 , running:

mamba clean --all
mamba install gazebo=11.10.0

but I then stumbled on the problem:

$ gzserver --verbose
Gazebo multi-robot simulator, version 11.10.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 192.168.1.70
[Err] [server_main.cc:57] Ogre Error:ItemIdentityException: Resource with the name shadow_caster_vp_glsl already exists. in ResourceManager::add at /Users/runner/miniforge3/conda-bld/ogre_1655955436130/work/OgreMain/src/OgreResourceManager.cpp (line 158)

Already tracked in https://github.com/conda-forge/gazebo-feedstock/issues/119.

Apparently the issue was due to QT 5.12, so after installing qt-main (which upgrades qt to ver 5.15), I've installed Gazebo 11.10.2.

nunoguedelha commented 2 years ago

Same problem with Gazebo 11.10.2, the simulator doesn't run after launching the server.

nunoguedelha commented 2 years ago

Actually same problem for Gazebo ≥ 11.10.1.

traversaro commented 2 years ago

I reproduced the same problem compiling gazebo (commit https://github.com/osrf/gazebo/commit/92f1b42efcbcf53f63e9904da7bb090a926eecf9).

To reproduce (dependencies from https://github.com/osrf/gazebo/blob/bf205dd8cf67c0ab0f61560d875f5eb5118fe9e1/.github/workflows/conda-forge.yml):

mamba create -n gazebodev libtar cmake compilers make ninja pkg-config libprotobuf libsdformat libignition-cmake2 libignition-math6 libignition-transport8 libignition-common3 libignition-fuel-tools4 qt-main ogre=1.10 freeimage curl tbb-devel qwt tinyxml2 libccd boost-cpp libcurl tinyxml bzip2 zlib ffmpeg graphviz libgdal libusb bullet-cpp simbody hdf5 openal-soft glib gts dartsim
mamba activate gazebodev
git clone https://github.com/osrf/gazebo
cd gazebo
mkdir build
cd build
cmake -GNinja -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX
ninja
ninja install
source $CONDA_PREFIX/share/gazebo-11/setup.sh
gazebo
nunoguedelha commented 2 years ago

I reproduced the same problem compiling gazebo (commit osrf/gazebo@92f1b42).

To reproduce (dependencies from https://github.com/osrf/gazebo/blob/bf205dd8cf67c0ab0f61560d875f5eb5118fe9e1/.github/workflows/conda-forge.yml):

I've tried the same but I'm having lots of compile errors when running ninja due to Protobuf headers. Those are actually being found in the system (/usr/local/include/google/protobuf) instead of Conda install prefix, which can be seen in the Cmake cache:

 Protobuf_DIR                     Protobuf_DIR-NOTFOUND
 Protobuf_INCLUDE_DIR             /usr/local/include
 Protobuf_LIBRARY_DEBUG           /usr/local/lib/libprotobuf.dylib
 Protobuf_LIBRARY_RELEASE         /usr/local/lib/libprotobuf.dylib
 Protobuf_LITE_LIBRARY_DEBUG      /usr/local/lib/libprotobuf-lite.dylib
 Protobuf_LITE_LIBRARY_RELEASE    /usr/local/lib/libprotobuf-lite.dylib
 Protobuf_PROTOC_EXECUTABLE       /Users/nunoguedelha/miniforge3/envs/robotologybin3/bin/protoc
 Protobuf_PROTOC_LIBRARY_DEBUG    /usr/local/lib/libprotoc.dylib
 Protobuf_PROTOC_LIBRARY_RELEAS   /usr/local/lib/libprotoc.dylib

I could manually make these variables point to /Users/nunoguedelha/miniforge3/envs/robotologybin3/include and /Users/nunoguedelha/miniforge3/envs/robotologybin3/lib/libprotobufxxx.dylib but I guess it's better to do it in the CMakeLists.txt...

traversaro commented 2 years ago

I also had this problem with tags gazebo11_11.9.0 and gazebo11_11.9.1 with this env:

(gazebodev119) icub@iCubs-Mac-mini ~ % mamba list
# packages in environment at /Users/icub/mambaforge/envs/gazebodev119:
#
# Name                    Version                   Build  Channel
aom                       3.4.0                hbe31e94_1    conda-forge
assimp                    5.2.4                h3287542_0    conda-forge
atk-1.0                   2.36.0               heb41896_4    conda-forge
blosc                     1.21.1               hd414afc_3    conda-forge
boost-cpp                 1.74.0               h1cb353e_8    conda-forge
bullet-cpp                3.21            py310ha6a5cd6_3    conda-forge
bzip2                     1.0.8                h3422bc3_4    conda-forge
c-ares                    1.18.1               h3422bc3_0    conda-forge
c-compiler                1.5.0                h5008568_0    conda-forge
ca-certificates           2022.6.15            h4653dfc_0    conda-forge
cairo                     1.16.0            h73a0509_1013    conda-forge
cctools                   973.0.1             hcbb26d4_10    conda-forge
cctools_osx-arm64         973.0.1             he930820_10    conda-forge
cfitsio                   4.1.0                hd4f5c17_0    conda-forge
clang                     14.0.4               hce30654_0    conda-forge
clang-14                  14.0.4          default_h81a5282_0    conda-forge
clang_osx-arm64           14.0.4               hc634a12_2    conda-forge
clangxx                   14.0.4          default_hb7ecf47_0    conda-forge
clangxx_osx-arm64         14.0.4               hb7a33d8_2    conda-forge
cmake                     3.24.1               h967666c_0    conda-forge
compiler-rt               14.0.4               h4418234_0    conda-forge
compiler-rt_osx-arm64     14.0.4               hb07f8d1_0    conda-forge
compilers                 1.5.0                hce30654_0    conda-forge
console_bridge            1.0.2                h3e96240_1    conda-forge
cppzmq                    4.8.1                h3212551_0    conda-forge
curl                      7.83.1               h2fcd78c_0    conda-forge
cxx-compiler              1.5.0                hffc8910_0    conda-forge
dartsim                   6.12.1               h217873d_5    conda-forge
eigen                     3.4.0                hc021e02_0    conda-forge
expat                     2.4.8                h6b3803e_0    conda-forge
fcl                       0.6.1                hda9dc21_3    conda-forge
ffmpeg                    4.4.2           gpl_hfdc7bce_107    conda-forge
flann                     1.9.1             hd3e9afc_1011    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 hab24e00_0    conda-forge
fontconfig                2.14.0               hfb34624_0    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
fortran-compiler          1.5.0                h2ccabda_0    conda-forge
freeimage                 3.18.0              hb513136_10    conda-forge
freetype                  2.12.1               hd633e50_0    conda-forge
freexl                    1.0.6                h27ca646_0    conda-forge
fribidi                   1.0.10               h27ca646_0    conda-forge
gdk-pixbuf                2.42.8               hdded42e_0    conda-forge
geos                      3.11.0               h9a09cb3_0    conda-forge
geotiff                   1.7.1                hc898e3f_3    conda-forge
gettext                   0.19.8.1          h049c9fb_1008    conda-forge
gfortran                  11.3.0               h1ca8e4b_0    conda-forge
gfortran_impl_osx-arm64   11.3.0              h95416cd_25    conda-forge
gfortran_osx-arm64        11.3.0               h57527a5_0    conda-forge
giflib                    5.2.1                h27ca646_2    conda-forge
glib                      2.72.1               h332123e_0    conda-forge
glib-tools                2.72.1               h332123e_0    conda-forge
gmp                       6.2.1                h9f76cd9_0    conda-forge
gnutls                    3.7.7                h27a1928_0    conda-forge
graphite2                 1.3.13            h9f76cd9_1001    conda-forge
graphviz                  5.0.1                h37ddf74_0    conda-forge
gst-plugins-base          1.20.3               h8b7775e_1    conda-forge
gstreamer                 1.20.3               hcb7b3dd_1    conda-forge
gtk2                      2.24.33              h57013de_2    conda-forge
gts                       0.7.6                h4b6d4d6_2    conda-forge
harfbuzz                  5.1.0                hd36a07e_0    conda-forge
hdf4                      4.2.15               hc683e77_4    conda-forge
hdf5                      1.12.2          nompi_h8968d4b_100    conda-forge
icu                       70.1                 h6b3803e_0    conda-forge
imath                     3.1.5                h1280f1d_0    conda-forge
isl                       0.22.1               hb904e53_2    conda-forge
jpeg                      9e                   he4db4b2_2    conda-forge
json-c                    0.16                 hc449e50_0    conda-forge
jsoncpp                   1.9.5                hc021e02_1    conda-forge
jxrlib                    1.1                  h27ca646_2    conda-forge
kealib                    1.4.15               h02ce806_1    conda-forge
krb5                      1.19.3               hf9b2bbe_0    conda-forge
lame                      3.100             h27ca646_1001    conda-forge
lcms2                     2.12                 had6a04f_0    conda-forge
ld64                      609                 h619f069_10    conda-forge
ld64_osx-arm64            609                 h132958c_10    conda-forge
lerc                      4.0.0                h9a09cb3_0    conda-forge
libblas                   3.9.0           16_osxarm64_openblas    conda-forge
libcblas                  3.9.0           16_osxarm64_openblas    conda-forge
libccd                    2.1                  hbdafb3b_1    conda-forge
libclang                  14.0.4          default_h81a5282_0    conda-forge
libclang-cpp14            14.0.4          default_h81a5282_0    conda-forge
libclang13                14.0.4          default_he70ec0d_0    conda-forge
libcurl                   7.83.1               h2fcd78c_0    conda-forge
libcxx                    14.0.6               h2692d47_0    conda-forge
libdap4                   3.20.6               h8510809_2    conda-forge
libdeflate                1.13                 h57fd34a_0    conda-forge
libedit                   3.1.20191231         hc8eb9b7_2    conda-forge
libev                     4.33                 h642e427_1    conda-forge
libffi                    3.4.2                h3422bc3_5    conda-forge
libgd                     2.3.3                hede1055_3    conda-forge
libgdal                   3.5.1                he1a18a7_5    conda-forge
libgfortran               5.0.0           11_3_0_hd922786_25    conda-forge
libgfortran-devel_osx-arm64 11.3.0              hfe9555d_25    conda-forge
libgfortran5              11.3.0              hdaf2cc0_25    conda-forge
libglib                   2.72.1               ha1047ec_0    conda-forge
libiconv                  1.16                 h642e427_0    conda-forge
libidn2                   2.3.3                he4db4b2_0    conda-forge
libignition-cmake2        2.15.0               hb7217d7_0    conda-forge
libignition-common3       3.13.2               ha785882_3    conda-forge
libignition-fuel-tools4   4.4.0                ha52498d_8    conda-forge
libignition-math6         6.11.0          py310h520f069_1    conda-forge
libignition-msgs5         5.9.0                hd2c25e4_1    conda-forge
libignition-tools1        1.5.0                h05620d7_0    conda-forge
libignition-transport8    8.3.0                h9e26ccd_1    conda-forge
libkml                    1.3.0             h893ab4d_1014    conda-forge
liblapack                 3.9.0           16_osxarm64_openblas    conda-forge
libllvm14                 14.0.4               h37c5ba8_0    conda-forge
libnetcdf                 4.8.1           nompi_h996a5af_104    conda-forge
libnghttp2                1.47.0               h232270b_1    conda-forge
libode                    0.16.2          py310h1105856_10    conda-forge
libogg                    1.3.4                h27ca646_1    conda-forge
libopenblas               0.3.21          openmp_hc731615_3    conda-forge
libopus                   1.3.1                h27ca646_1    conda-forge
libpng                    1.6.37               h9b2ccdc_4    conda-forge
libpq                     14.5                 hb2ab832_0    conda-forge
libprotobuf               3.21.5               hb5ab8b9_3    conda-forge
libraw                    0.20.2               h9166135_1    conda-forge
librsvg                   2.54.4               ha2634a2_0    conda-forge
librttopo                 1.1.0               h275bb25_11    conda-forge
libsdformat               9.8.0                hb3dc90a_2    conda-forge
libsodium                 1.0.18               h27ca646_1    conda-forge
libspatialite             5.0.1               h47b1232_18    conda-forge
libsqlite                 3.39.3               h76d750c_0    conda-forge
libssh2                   1.10.0               hb80f160_3    conda-forge
libtar                    1.2.20            h3422bc3_1004    conda-forge
libtasn1                  4.19.0               h1a8c8d9_0    conda-forge
libtiff                   4.4.0                hd6ca8d7_3    conda-forge
libtool                   2.4.6             hbdafb3b_1008    conda-forge
libunistring              0.9.10               h3422bc3_0    conda-forge
libusb                    1.0.26             h1c322ee_100    conda-forge
libuv                     1.44.2               he4db4b2_0    conda-forge
libvorbis                 1.3.7                h9f76cd9_0    conda-forge
libvpx                    1.11.0               hc470f4d_3    conda-forge
libwebp                   1.2.4                h328b37c_0    conda-forge
libwebp-base              1.2.4                h57fd34a_0    conda-forge
libxcb                    1.13              h9b22ae9_1004    conda-forge
libxml2                   2.9.14               h9d8dfc2_4    conda-forge
libzip                    1.9.2                h96606af_1    conda-forge
libzlib                   1.2.12               ha287fd2_2    conda-forge
llvm-openmp               14.0.4               hd125106_0    conda-forge
llvm-tools                14.0.4               h37c5ba8_0    conda-forge
lz4-c                     1.9.3                hbdafb3b_1    conda-forge
make                      4.3                  he57ea6c_1    conda-forge
mpc                       1.2.1                h309154c_0    conda-forge
mpfr                      4.1.0                h6d7a090_1    conda-forge
mysql-common              8.0.30               hab468bb_1    conda-forge
mysql-libs                8.0.30               hea58576_1    conda-forge
ncurses                   6.3                  h07bb92c_1    conda-forge
nettle                    3.8.1                h63371fa_1    conda-forge
ninja                     1.11.0               hf86a087_0    conda-forge
nspr                      4.32                 hbdafb3b_1    conda-forge
nss                       3.78                 h1483a63_0    conda-forge
numpy                     1.23.2          py310h127c7cf_0    conda-forge
octomap                   1.9.7                hc021e02_0    conda-forge
ogre                      1.10.12              h5654cb5_9    conda-forge
openal-soft               1.22.2               hf86a087_0    conda-forge
openexr                   3.1.5                h264c651_0    conda-forge
openh264                  2.3.0                h9a09cb3_0    conda-forge
openjpeg                  2.5.0                h5d4e404_1    conda-forge
openssl                   1.1.1q               ha287fd2_0    conda-forge
p11-kit                   0.24.1               h29577a5_0    conda-forge
pango                     1.50.9               hc1f5a69_0    conda-forge
pcre                      8.45                 hbdafb3b_0    conda-forge
pip                       22.2.2             pyhd8ed1ab_0    conda-forge
pixman                    0.40.0               h27ca646_0    conda-forge
pkg-config                0.29.2            hab62308_1008    conda-forge
poppler                   22.04.0              h2eb88e3_2    conda-forge
poppler-data              0.4.11               hd8ed1ab_0    conda-forge
postgresql                14.5                 hb0ca4ee_0    conda-forge
proj                      9.0.1                h4c79c2b_1    conda-forge
pthread-stubs             0.4               h27ca646_1001    conda-forge
pugixml                   1.11.4               hbdafb3b_0    conda-forge
pybind11-abi              4                    hd8ed1ab_3    conda-forge
python                    3.10.6          hbce4517_0_cpython    conda-forge
python_abi                3.10                    2_cp310    conda-forge
qt-main                   5.15.4               haf604a7_2    conda-forge
qwt                       6.2.0                h52c5239_4    conda-forge
readline                  8.1.2                h46ed386_0    conda-forge
rhash                     1.4.3                he4db4b2_0    conda-forge
ruby                      3.1.2                h462d72a_0    conda-forge
sdl2                      2.0.22               h9a09cb3_2    conda-forge
setuptools                65.3.0             pyhd8ed1ab_1    conda-forge
sigtool                   0.1.3                h7747421_0    conda-forge
simbody                   3.7                  h4b178c3_3    conda-forge
snappy                    1.1.9                h39c3846_1    conda-forge
sqlite                    3.39.3               h2229b38_0    conda-forge
svt-av1                   1.2.1                he23bcac_0    conda-forge
swig                      4.0.2                hc25a523_2    conda-forge
tapi                      1100.0.11            he4954df_0    conda-forge
tbb                       2020.2               h260d524_4    conda-forge
tbb-devel                 2020.2               h260d524_4    conda-forge
tiledb                    2.11.1               hc7ac4c9_0    conda-forge
tinyxml                   2.6.2                h260d524_2    conda-forge
tinyxml2                  9.0.0                hbdafb3b_2    conda-forge
tk                        8.6.12               he1e0b03_0    conda-forge
tzcode                    2022c                h57fd34a_0    conda-forge
tzdata                    2022c                h191b570_0    conda-forge
urdfdom                   3.1.0                h19b2bf3_1    conda-forge
urdfdom_headers           1.1.0                hf86a087_0    conda-forge
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
x264                      1!164.3095           h57fd34a_2    conda-forge
x265                      3.5                  hbc6ce65_3    conda-forge
xerces-c                  3.2.3                h1b0b642_5    conda-forge
xorg-kbproto              1.0.7             h27ca646_1002    conda-forge
xorg-libice               1.0.10               h27ca646_0    conda-forge
xorg-libsm                1.2.3             h27ca646_1000    conda-forge
xorg-libx11               1.7.2                h3422bc3_0    conda-forge
xorg-libxau               1.0.9                h27ca646_0    conda-forge
xorg-libxaw               1.0.14               h3422bc3_1    conda-forge
xorg-libxdmcp             1.1.3                h27ca646_0    conda-forge
xorg-libxext              1.3.4                h27ca646_1    conda-forge
xorg-libxmu               1.1.3                h3422bc3_0    conda-forge
xorg-libxpm               3.5.13               h3422bc3_0    conda-forge
xorg-libxt                1.2.1                h27ca646_2    conda-forge
xorg-xextproto            7.3.0             h27ca646_1002    conda-forge
xorg-xproto               7.0.31            h27ca646_1007    conda-forge
xz                        5.2.6                h57fd34a_0    conda-forge
yaml                      0.2.5                h3422bc3_2    conda-forge
zeromq                    4.3.4                hbdafb3b_1    conda-forge
zlib                      1.2.12               ha287fd2_2    conda-forge
zstd                      1.5.2                h8128057_4    conda-forge
zziplib                   0.13.69              he1e0b03_1    conda-forge

So probably the issue is not related to 11.9 vs 11.11, but rather to something else (compilation, dependencies).

traversaro commented 2 years ago

I could manually make these variables point to /Users/nunoguedelha/miniforge3/envs/robotologybin3/include and /Users/nunoguedelha/miniforge3/envs/robotologybin3/lib/libprotobufxxx.dylib but I guess it's better to do it in the CMakeLists.txt...

As long as they are correct, probably that is ok, even if it is a good idea to avoiding polluting the CMakeLists.txt .

nunoguedelha commented 2 years ago

Maybe installing the google protobuf (libprotobuf-dev) would help?

traversaro commented 2 years ago

Maybe installing the google protobuf (libprotobuf-dev) would help?

All the development libraries should be provided by libprotobuf , I do not think there is a libprotobuf-dev package in conda-forge .

nunoguedelha commented 2 years ago

I added to the CMake command line DCMAKE_PREFIX_PATH=$CONDA_PREFIX to force CMake to find protobuf in conda environment. With this, the ninja compilation step seems to be working.

traversaro commented 2 years ago

I wondered if the problem was related to the clang version, but I tried with both clang 12 and clang 13 and the result was the same.

traversaro commented 2 years ago

I am debugging more in depth the issue, and apparently on macOS gzserver is running normally (the physics is effectively stepped), but for some reason not all topics are opened:

(gazebo) icub@iCubs-Mac-mini ~ % gz topic -l
/gazebo/default/atmosphere
/gazebo/default/factory
/gazebo/default/factory/light
/gazebo/default/joint
/gazebo/default/light/modify
/gazebo/default/log/control
/gazebo/default/model/modify
/gazebo/default/physics
/gazebo/default/playback_control
/gazebo/default/pose/modify
/gazebo/default/request
/gazebo/default/undo_redo
/gazebo/default/user_cmd
/gazebo/default/wind
/gazebo/default/world_control
/gazebo/server/control

vs a normal empty gazebo instance:

(gazebo) traversaro@IITICUBLAP257:~$ gz topic -l
/gazebo/default/atmosphere
/gazebo/default/diagnostics
/gazebo/default/factory
/gazebo/default/factory/light
/gazebo/default/gui
/gazebo/default/joint
/gazebo/default/light/modify
/gazebo/default/log/control
/gazebo/default/log/status
/gazebo/default/model/info
/gazebo/default/model/modify
/gazebo/default/physics
/gazebo/default/physics/contacts
/gazebo/default/playback_control
/gazebo/default/pose/info
/gazebo/default/pose/local/info
/gazebo/default/pose/modify
/gazebo/default/request
/gazebo/default/response
/gazebo/default/undo_redo
/gazebo/default/user_cmd
/gazebo/default/user_cmd_stats
/gazebo/default/visual
/gazebo/default/wind
/gazebo/default/world_control
/gazebo/default/world_stats
/gazebo/performance_metrics
/gazebo/server/control
/gazebo/world/modify
traversaro commented 2 years ago

I debugged quite in depth, and the issue seems that ConnectionManager::Instance is not behaving as Singleton, but instead it is returning different instances over time. I am not sure what is the reason behind that, but may be it is just a strange side effect of some ABI incompatibility in the dependency chain?

traversaro commented 2 years ago

I added the following code to further debug:

diff --git a/gazebo/common/SingletonT.hh b/gazebo/common/SingletonT.hh
index e97b7c792e..3861046895 100644
--- a/gazebo/common/SingletonT.hh
+++ b/gazebo/common/SingletonT.hh
@@ -24,6 +24,10 @@

 #include "gazebo/util/system.hh"

+#include <iostream>
+#include <thread>
+#include <typeinfo>
+
 /// \addtogroup gazebo_common Common
 /// \{

@@ -48,8 +52,14 @@ class SingletonT
   private: static T &GetInstance()
            {
              static T t;
+             std::cerr << "\nSingletonT::GetInstance with type " <<  typeid(t).name() << " and instance " << &t << " thread_id " << std::this_thread::get_id() << std::endl;
              return static_cast<T &>(t);
            }
+
+  public: SingletonT(SingletonT const&) = delete;
+  public: void operator=(SingletonT const&)  = delete;
+  public: SingletonT(SingletonT &&) = delete;
+  public: void operator=(SingletonT &&)  = delete;
 };

 /// \brief Helper to declare typed SingletonT
diff --git a/gazebo/transport/ConnectionManager.cc b/gazebo/transport/ConnectionManager.cc
index 17016a4362..2175825108 100644
--- a/gazebo/transport/ConnectionManager.cc
+++ b/gazebo/transport/ConnectionManager.cc
@@ -71,6 +71,7 @@ class TopicManagerConnectionTask
 ConnectionManager::ConnectionManager()
 {
   this->tmpIndex = 0;
+  std::cerr << "Seetting ConnectionManager::initialized to false (costru), this: " << this << std::endl;
   this->initialized = false;
   this->stop = false;
   this->stopped = true;
@@ -201,6 +202,7 @@ bool ConnectionManager::Init(const std::string &_masterHost,
   this->masterConn->AsyncRead(
       boost::bind(&ConnectionManager::OnMasterRead, this, _1));

+  std::cerr << "Seetting ConnectionManager::initialized to true (init), this: " << this << std::endl;
   this->initialized = true;

   // Tell the user what address will be publicized to other nodes.
@@ -249,7 +251,7 @@ void ConnectionManager::Fini()
   this->publishers.clear();
   this->namespaces.clear();
   this->masterMessages.clear();
-
+  std::cerr << "Seetting ConnectionManager::initialized to false (destru), this: " << this << std::endl;
   this->initialized = false;
 }

@@ -507,6 +509,7 @@ void ConnectionManager::OnRead(ConnectionPtr _connection,
 void ConnectionManager::Advertise(const std::string &topic,
                                   const std::string &msgType)
 {
+  std::cerr << "ConnectionManager::Advertise: this->initialized " << this->initialized << " this " << this << std::endl;
   if (!this->initialized)
     return;

@@ -516,6 +519,7 @@ void ConnectionManager::Advertise(const std::string &topic,
   msg.set_host(this->serverConn->GetLocalAddress());
   msg.set_port(this->serverConn->GetLocalPort());

+  std::cerr << "ConnectionManager::Advertise: topic: " << topic << " msgType " << msgType << std::endl;
   this->masterConn->EnqueueMsg(msgs::Package("advertise", msg));
 }

and this is the output: https://gist.github.com/traversaro/9783ef649048eab0a22ce82efed94978 .

It is possible to see how in sometimes the singleton type is the same, but the returned instance is different, for example:

SingletonT::GetInstance with type N6gazebo9transport17ConnectionManagerE and instance 0x1019888a8 thread_id 0x100ca8580
SingletonT::GetInstance with type N6gazebo9transport17ConnectionManagerE and instance 0x10284ef90 thread_id 0x100ca8580
SingletonT::GetInstance with type N6gazebo9transport17ConnectionManagerE and instance 0x100ba4db8 thread_id 0x100ca8580
SingletonT::GetInstance with type N6gazebo9transport17ConnectionManagerE and instance 0x100e78f50 thread_id 0x100ca8580
SingletonT::GetInstance with type N6gazebo9transport17ConnectionManagerE and instance 0x101871248 thread_id 0x100ca8580

However, after the initial confusion, the instance return always the first (correctly initialized) instance:

SingletonT::GetInstance with type N6gazebo9transport17ConnectionManagerE and instance 0x1019888a8 thread_id 0x17202f000

I have still no idea of what is happening. My best hypothesis is of a magical ABI problem in the dependency that would explain that, but to be honest at the moment I do not know how to debug this further, probably I should use something like valgrind or a memory/address sanitizer, but valgrind does not work on M1, and I was not able to get the Memory or Address sanitizer to work.

traversaro commented 1 year ago

Just for check, I tried to run gzserver --verbose under valgrind on Linux, but there was nothing too strange:

(gazebo1112) traversaro@IITICUBLAP257:~/valws$ valgrind --gen-suppressions=all --suppressions=./wsl.supp /home/traversaro/mambaforge/envs/gazebo1112/bin/gzserver --verbose
==1115== Memcheck, a memory error detector
==1115== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==1115== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==1115== Command: /home/traversaro/mambaforge/envs/gazebo1112/bin/gzserver --verbose
==1115==
Gazebo multi-robot simulator, version 11.12.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 172.21.215.116
==1115== Invalid read of size 8
==1115==    at 0x40286C8: strncmp (strcmp.S:172)
==1115==    by 0x400668D: is_dst (dl-load.c:216)
==1115==    by 0x400810E: _dl_dst_count (dl-load.c:253)
==1115==    by 0x400810E: expand_dynamic_string_token (dl-load.c:395)
==1115==    by 0x40082B7: fillin_rpath.isra.0 (dl-load.c:483)
==1115==    by 0x4008602: decompose_rpath (dl-load.c:654)
==1115==    by 0x400ABF5: cache_rpath (dl-load.c:696)
==1115==    by 0x400ABF5: cache_rpath (dl-load.c:677)
==1115==    by 0x400ABF5: _dl_map_object (dl-load.c:2165)
==1115==    by 0x4003494: openaux (dl-deps.c:64)
==1115==    by 0x5378C27: _dl_catch_exception (dl-error-skeleton.c:208)
==1115==    by 0x4003C7B: _dl_map_object_deps (dl-deps.c:248)
==1115==    by 0x400EA0E: dl_open_worker_begin (dl-open.c:592)
==1115==    by 0x5378C27: _dl_catch_exception (dl-error-skeleton.c:208)
==1115==    by 0x400DF99: dl_open_worker (dl-open.c:782)
==1115==  Address 0x84b7c169 is 9 bytes inside a block of size 15 alloc'd
==1115==    at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==1115==    by 0x40271FF: malloc (rtld-malloc.h:56)
==1115==    by 0x40271FF: strdup (strdup.c:42)
==1115==    by 0x4008594: decompose_rpath (dl-load.c:629)
==1115==    by 0x400ABF5: cache_rpath (dl-load.c:696)
==1115==    by 0x400ABF5: cache_rpath (dl-load.c:677)
==1115==    by 0x400ABF5: _dl_map_object (dl-load.c:2165)
==1115==    by 0x4003494: openaux (dl-deps.c:64)
==1115==    by 0x5378C27: _dl_catch_exception (dl-error-skeleton.c:208)
==1115==    by 0x4003C7B: _dl_map_object_deps (dl-deps.c:248)
==1115==    by 0x400EA0E: dl_open_worker_begin (dl-open.c:592)
==1115==    by 0x5378C27: _dl_catch_exception (dl-error-skeleton.c:208)
==1115==    by 0x400DF99: dl_open_worker (dl-open.c:782)
==1115==    by 0x5378C27: _dl_catch_exception (dl-error-skeleton.c:208)
==1115==    by 0x400E34D: _dl_open (dl-open.c:883)
==1115==
{
   <insert_a_suppression_name_here>
   Memcheck:Addr8
   fun:strncmp
   fun:is_dst
   fun:_dl_dst_count
   fun:expand_dynamic_string_token
   fun:fillin_rpath.isra.0
   fun:decompose_rpath
   fun:cache_rpath
   fun:cache_rpath
   fun:_dl_map_object
   fun:openaux
   fun:_dl_catch_exception
   fun:_dl_map_object_deps
   fun:dl_open_worker_begin
   fun:_dl_catch_exception
   fun:dl_open_worker
}
==1115== Invalid read of size 8
==1115==    at 0x40286C8: strncmp (strcmp.S:172)
==1115==    by 0x400668D: is_dst (dl-load.c:216)
==1115==    by 0x4007F79: _dl_dst_substitute (dl-load.c:295)
==1115==    by 0x40082B7: fillin_rpath.isra.0 (dl-load.c:483)
==1115==    by 0x4008602: decompose_rpath (dl-load.c:654)
==1115==    by 0x400ABF5: cache_rpath (dl-load.c:696)
==1115==    by 0x400ABF5: cache_rpath (dl-load.c:677)
==1115==    by 0x400ABF5: _dl_map_object (dl-load.c:2165)
==1115==    by 0x4003494: openaux (dl-deps.c:64)
==1115==    by 0x5378C27: _dl_catch_exception (dl-error-skeleton.c:208)
==1115==    by 0x4003C7B: _dl_map_object_deps (dl-deps.c:248)
==1115==    by 0x400EA0E: dl_open_worker_begin (dl-open.c:592)
==1115==    by 0x5378C27: _dl_catch_exception (dl-error-skeleton.c:208)
==1115==    by 0x400DF99: dl_open_worker (dl-open.c:782)
==1115==  Address 0x84b7c169 is 9 bytes inside a block of size 15 alloc'd
==1115==    at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==1115==    by 0x40271FF: malloc (rtld-malloc.h:56)
==1115==    by 0x40271FF: strdup (strdup.c:42)
==1115==    by 0x4008594: decompose_rpath (dl-load.c:629)
==1115==    by 0x400ABF5: cache_rpath (dl-load.c:696)
==1115==    by 0x400ABF5: cache_rpath (dl-load.c:677)
==1115==    by 0x400ABF5: _dl_map_object (dl-load.c:2165)
==1115==    by 0x4003494: openaux (dl-deps.c:64)
==1115==    by 0x5378C27: _dl_catch_exception (dl-error-skeleton.c:208)
==1115==    by 0x4003C7B: _dl_map_object_deps (dl-deps.c:248)
==1115==    by 0x400EA0E: dl_open_worker_begin (dl-open.c:592)
==1115==    by 0x5378C27: _dl_catch_exception (dl-error-skeleton.c:208)
==1115==    by 0x400DF99: dl_open_worker (dl-open.c:782)
==1115==    by 0x5378C27: _dl_catch_exception (dl-error-skeleton.c:208)
==1115==    by 0x400E34D: _dl_open (dl-open.c:883)
==1115==
{
   <insert_a_suppression_name_here>
   Memcheck:Addr8
   fun:strncmp
   fun:is_dst
   fun:_dl_dst_substitute
   fun:fillin_rpath.isra.0
   fun:decompose_rpath
   fun:cache_rpath
   fun:cache_rpath
   fun:_dl_map_object
   fun:openaux
   fun:_dl_catch_exception
   fun:_dl_map_object_deps
   fun:dl_open_worker_begin
   fun:_dl_catch_exception
   fun:dl_open_worker
}

==1115== Conditional jump or move depends on uninitialised value(s)
==1115==    at 0x51130CD: std::ostreambuf_iterator<char, std::char_traits<char> > std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::_M_insert_int<long>(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, long) const (locale_facets.tcc:892)
==1115==    by 0x511C17F: std::ostream& std::ostream::_M_insert<long>(long) (ostream.tcc:73)
==1115==    by 0x4CDA738: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > Ogre::StringConverter::_toString<int>(int, unsigned short, char, std::_Ios_Fmtflags) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libOgreMain.so.1.10.12)
==1115==    by 0x4CDAA44: Ogre::StringConverter::toString[abi:cxx11](int, unsigned short, char, std::_Ios_Fmtflags) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libOgreMain.so.1.10.12)
==1115==    by 0x4BE0FED: Ogre::RenderSystemCapabilities::log(Ogre::Log*) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libOgreMain.so.1.10.12)
==1115==    by 0x9AA62839: Ogre::GLRenderSystem::initialiseFromRenderSystemCapabilities(Ogre::RenderSystemCapabilities*, Ogre::RenderTarget*) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/OGRE/RenderSystem_GL.so.1.10.12)
==1115==    by 0x9AA647C0: Ogre::GLRenderSystem::_createRenderWindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int, bool, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const*) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/OGRE/RenderSystem_GL.so.1.10.12)
==1115==    by 0x4C1C291: Ogre::Root::createRenderWindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int, bool, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const*) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libOgreMain.so.1.10.12)
==1115==    by 0x5700943: gazebo::rendering::WindowManager::CreateWindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int, double) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libgazebo_rendering.so.11.12.0)
==1115==    by 0x5686F34: gazebo::rendering::RenderEngine::Load() (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libgazebo_rendering.so.11.12.0)
==1115==    by 0x5688756: gazebo::rendering::load() (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libgazebo_rendering.so.11.12.0)
==1115==    by 0x48B7E2D: gazebo::setupServer(int, char**) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libgazebo.so.11.12.0)
==1115==
{
   <insert_a_suppression_name_here>
   Memcheck:Cond
   fun:_ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIlEES3_S3_RSt8ios_basecT_
   fun:_ZNSo9_M_insertIlEERSoT_
   fun:_ZN4Ogre15StringConverter9_toStringIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_tcSt13_Ios_Fmtflags
   fun:_ZN4Ogre15StringConverter8toStringB5cxx11EitcSt13_Ios_Fmtflags
   fun:_ZN4Ogre24RenderSystemCapabilities3logEPNS_3LogE
   fun:_ZN4Ogre14GLRenderSystem38initialiseFromRenderSystemCapabilitiesEPNS_24RenderSystemCapabilitiesEPNS_12RenderTargetE
   fun:_ZN4Ogre14GLRenderSystem19_createRenderWindowERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjjbPKSt3mapIS6_S6_St4lessIS6_ESaISt4pairIS7_S6_EEE
   fun:_ZN4Ogre4Root18createRenderWindowERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjjbPKSt3mapIS6_S6_St4lessIS6_ESaISt4pairIS7_S6_EEE
   fun:_ZN6gazebo9rendering13WindowManager12CreateWindowERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjjd
   fun:_ZN6gazebo9rendering12RenderEngine4LoadEv
   fun:_ZN6gazebo9rendering4loadEv
   fun:_ZN6gazebo11setupServerEiPPc
}
==1115== Use of uninitialised value of size 8
==1115==    at 0x5112901: int std::__int_to_char<char, unsigned long>(char*, unsigned long, char const*, std::_Ios_Fmtflags, bool) (locale_facets.tcc:821)
==1115==    by 0x51130E8: std::ostreambuf_iterator<char, std::char_traits<char> > std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::_M_insert_int<long>(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, long) const (locale_facets.tcc:894)
==1115==    by 0x511C17F: std::ostream& std::ostream::_M_insert<long>(long) (ostream.tcc:73)
==1115==    by 0x4CDA738: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > Ogre::StringConverter::_toString<int>(int, unsigned short, char, std::_Ios_Fmtflags) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libOgreMain.so.1.10.12)
==1115==    by 0x4CDAA44: Ogre::StringConverter::toString[abi:cxx11](int, unsigned short, char, std::_Ios_Fmtflags) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libOgreMain.so.1.10.12)
==1115==    by 0x4BE0FED: Ogre::RenderSystemCapabilities::log(Ogre::Log*) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libOgreMain.so.1.10.12)
==1115==    by 0x9AA62839: Ogre::GLRenderSystem::initialiseFromRenderSystemCapabilities(Ogre::RenderSystemCapabilities*, Ogre::RenderTarget*) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/OGRE/RenderSystem_GL.so.1.10.12)
==1115==    by 0x9AA647C0: Ogre::GLRenderSystem::_createRenderWindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int, bool, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const*) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/OGRE/RenderSystem_GL.so.1.10.12)
==1115==    by 0x4C1C291: Ogre::Root::createRenderWindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int, bool, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const*) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libOgreMain.so.1.10.12)
==1115==    by 0x5700943: gazebo::rendering::WindowManager::CreateWindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int, double) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libgazebo_rendering.so.11.12.0)
==1115==    by 0x5686F34: gazebo::rendering::RenderEngine::Load() (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libgazebo_rendering.so.11.12.0)
==1115==    by 0x5688756: gazebo::rendering::load() (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libgazebo_rendering.so.11.12.0)
==1115==
{
   <insert_a_suppression_name_here>
   Memcheck:Value8
   fun:_ZSt13__int_to_charIcmEiPT_T0_PKS0_St13_Ios_Fmtflagsb
   fun:_ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIlEES3_S3_RSt8ios_basecT_
   fun:_ZNSo9_M_insertIlEERSoT_
   fun:_ZN4Ogre15StringConverter9_toStringIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_tcSt13_Ios_Fmtflags
   fun:_ZN4Ogre15StringConverter8toStringB5cxx11EitcSt13_Ios_Fmtflags
   fun:_ZN4Ogre24RenderSystemCapabilities3logEPNS_3LogE
   fun:_ZN4Ogre14GLRenderSystem38initialiseFromRenderSystemCapabilitiesEPNS_24RenderSystemCapabilitiesEPNS_12RenderTargetE
   fun:_ZN4Ogre14GLRenderSystem19_createRenderWindowERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjjbPKSt3mapIS6_S6_St4lessIS6_ESaISt4pairIS7_S6_EEE
   fun:_ZN4Ogre4Root18createRenderWindowERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjjbPKSt3mapIS6_S6_St4lessIS6_ESaISt4pairIS7_S6_EEE
   fun:_ZN6gazebo9rendering13WindowManager12CreateWindowERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjjd
   fun:_ZN6gazebo9rendering12RenderEngine4LoadEv
   fun:_ZN6gazebo9rendering4loadEv
}
==1115== Conditional jump or move depends on uninitialised value(s)
==1115==    at 0x5112912: int std::__int_to_char<char, unsigned long>(char*, unsigned long, char const*, std::_Ios_Fmtflags, bool) (locale_facets.tcc:824)
==1115==    by 0x51130E8: std::ostreambuf_iterator<char, std::char_traits<char> > std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::_M_insert_int<long>(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, long) const (locale_facets.tcc:894)
==1115==    by 0x511C17F: std::ostream& std::ostream::_M_insert<long>(long) (ostream.tcc:73)
==1115==    by 0x4CDA738: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > Ogre::StringConverter::_toString<int>(int, unsigned short, char, std::_Ios_Fmtflags) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libOgreMain.so.1.10.12)
==1115==    by 0x4CDAA44: Ogre::StringConverter::toString[abi:cxx11](int, unsigned short, char, std::_Ios_Fmtflags) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libOgreMain.so.1.10.12)
==1115==    by 0x4BE0FED: Ogre::RenderSystemCapabilities::log(Ogre::Log*) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libOgreMain.so.1.10.12)
==1115==    by 0x9AA62839: Ogre::GLRenderSystem::initialiseFromRenderSystemCapabilities(Ogre::RenderSystemCapabilities*, Ogre::RenderTarget*) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/OGRE/RenderSystem_GL.so.1.10.12)
==1115==    by 0x9AA647C0: Ogre::GLRenderSystem::_createRenderWindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int, bool, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const*) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/OGRE/RenderSystem_GL.so.1.10.12)
==1115==    by 0x4C1C291: Ogre::Root::createRenderWindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int, bool, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const*) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libOgreMain.so.1.10.12)
==1115==    by 0x5700943: gazebo::rendering::WindowManager::CreateWindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int, double) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libgazebo_rendering.so.11.12.0)
==1115==    by 0x5686F34: gazebo::rendering::RenderEngine::Load() (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libgazebo_rendering.so.11.12.0)
==1115==    by 0x5688756: gazebo::rendering::load() (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libgazebo_rendering.so.11.12.0)
==1115==
{
   <insert_a_suppression_name_here>
   Memcheck:Cond
   fun:_ZSt13__int_to_charIcmEiPT_T0_PKS0_St13_Ios_Fmtflagsb
   fun:_ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIlEES3_S3_RSt8ios_basecT_
   fun:_ZNSo9_M_insertIlEERSoT_
   fun:_ZN4Ogre15StringConverter9_toStringIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_tcSt13_Ios_Fmtflags
   fun:_ZN4Ogre15StringConverter8toStringB5cxx11EitcSt13_Ios_Fmtflags
   fun:_ZN4Ogre24RenderSystemCapabilities3logEPNS_3LogE
   fun:_ZN4Ogre14GLRenderSystem38initialiseFromRenderSystemCapabilitiesEPNS_24RenderSystemCapabilitiesEPNS_12RenderTargetE
   fun:_ZN4Ogre14GLRenderSystem19_createRenderWindowERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjjbPKSt3mapIS6_S6_St4lessIS6_ESaISt4pairIS7_S6_EEE
   fun:_ZN4Ogre4Root18createRenderWindowERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjjbPKSt3mapIS6_S6_St4lessIS6_ESaISt4pairIS7_S6_EEE
   fun:_ZN6gazebo9rendering13WindowManager12CreateWindowERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjjd
   fun:_ZN6gazebo9rendering12RenderEngine4LoadEv
   fun:_ZN6gazebo9rendering4loadEv
}
==1115== Conditional jump or move depends on uninitialised value(s)
==1115==    at 0x5113160: std::ostreambuf_iterator<char, std::char_traits<char> > std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::_M_insert_int<long>(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, long) const (locale_facets.tcc:914)
==1115==    by 0x511C17F: std::ostream& std::ostream::_M_insert<long>(long) (ostream.tcc:73)
==1115==    by 0x4CDA738: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > Ogre::StringConverter::_toString<int>(int, unsigned short, char, std::_Ios_Fmtflags) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libOgreMain.so.1.10.12)
==1115==    by 0x4CDAA44: Ogre::StringConverter::toString[abi:cxx11](int, unsigned short, char, std::_Ios_Fmtflags) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libOgreMain.so.1.10.12)
==1115==    by 0x4BE0FED: Ogre::RenderSystemCapabilities::log(Ogre::Log*) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libOgreMain.so.1.10.12)
==1115==    by 0x9AA62839: Ogre::GLRenderSystem::initialiseFromRenderSystemCapabilities(Ogre::RenderSystemCapabilities*, Ogre::RenderTarget*) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/OGRE/RenderSystem_GL.so.1.10.12)
==1115==    by 0x9AA647C0: Ogre::GLRenderSystem::_createRenderWindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int, bool, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const*) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/OGRE/RenderSystem_GL.so.1.10.12)
==1115==    by 0x4C1C291: Ogre::Root::createRenderWindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int, bool, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const*) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libOgreMain.so.1.10.12)
==1115==    by 0x5700943: gazebo::rendering::WindowManager::CreateWindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int, double) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libgazebo_rendering.so.11.12.0)
==1115==    by 0x5686F34: gazebo::rendering::RenderEngine::Load() (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libgazebo_rendering.so.11.12.0)
==1115==    by 0x5688756: gazebo::rendering::load() (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libgazebo_rendering.so.11.12.0)
==1115==    by 0x48B7E2D: gazebo::setupServer(int, char**) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libgazebo.so.11.12.0)
==1115==
{
   <insert_a_suppression_name_here>
   Memcheck:Cond
   fun:_ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIlEES3_S3_RSt8ios_basecT_
   fun:_ZNSo9_M_insertIlEERSoT_
   fun:_ZN4Ogre15StringConverter9_toStringIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_tcSt13_Ios_Fmtflags
   fun:_ZN4Ogre15StringConverter8toStringB5cxx11EitcSt13_Ios_Fmtflags
   fun:_ZN4Ogre24RenderSystemCapabilities3logEPNS_3LogE
   fun:_ZN4Ogre14GLRenderSystem38initialiseFromRenderSystemCapabilitiesEPNS_24RenderSystemCapabilitiesEPNS_12RenderTargetE
   fun:_ZN4Ogre14GLRenderSystem19_createRenderWindowERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjjbPKSt3mapIS6_S6_St4lessIS6_ESaISt4pairIS7_S6_EEE
   fun:_ZN4Ogre4Root18createRenderWindowERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjjbPKSt3mapIS6_S6_St4lessIS6_ESaISt4pairIS7_S6_EEE
   fun:_ZN6gazebo9rendering13WindowManager12CreateWindowERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjjd
   fun:_ZN6gazebo9rendering12RenderEngine4LoadEv
   fun:_ZN6gazebo9rendering4loadEv
   fun:_ZN6gazebo11setupServerEiPPc
}
==1115== Conditional jump or move depends on uninitialised value(s)
==1115==    at 0xA07DB5E: Ogre::RTShader::ShaderGenerator::setTargetLanguage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, float) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libOgreRTShaderSystem.so.1.10.12)
==1115==    by 0x56921F7: gazebo::rendering::RTShaderSystem::Init() (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libgazebo_rendering.so.11.12.0)
==1115==    by 0x5685569: gazebo::rendering::RenderEngine::Init() (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libgazebo_rendering.so.11.12.0)
==1115==    by 0x5688816: gazebo::rendering::init() (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libgazebo_rendering.so.11.12.0)
==1115==    by 0x54C971D: gazebo::sensors::init() (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libgazebo_sensors.so.11.12.0)
==1115==    by 0x48B7E4B: gazebo::setupServer(int, char**) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libgazebo.so.11.12.0)
==1115==    by 0x48AA3DF: gazebo::Server::ParseArgs(int, char**) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libgazebo.so.11.12.0)
==1115==    by 0x113B91: ??? (in /home/traversaro/mambaforge/envs/gazebo1112/bin/gzserver-11.12.0)
==1115==    by 0x522DD8F: (below main) (libc_start_call_main.h:58)
==1115==
{
   <insert_a_suppression_name_here>
   Memcheck:Cond
   fun:_ZN4Ogre8RTShader15ShaderGenerator17setTargetLanguageERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEf
   fun:_ZN6gazebo9rendering14RTShaderSystem4InitEv
   fun:_ZN6gazebo9rendering12RenderEngine4InitEv
   fun:_ZN6gazebo9rendering4initEv
   fun:_ZN6gazebo7sensors4initEv
   fun:_ZN6gazebo11setupServerEiPPc
   fun:_ZN6gazebo6Server9ParseArgsEiPPc
   obj:/home/traversaro/mambaforge/envs/gazebo1112/bin/gzserver-11.12.0
   fun:(below main)
}
==1115== Conditional jump or move depends on uninitialised value(s)
==1115==    at 0xA07DB6D: Ogre::RTShader::ShaderGenerator::setTargetLanguage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, float) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libOgreRTShaderSystem.so.1.10.12)
==1115==    by 0x56921F7: gazebo::rendering::RTShaderSystem::Init() (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libgazebo_rendering.so.11.12.0)
==1115==    by 0x5685569: gazebo::rendering::RenderEngine::Init() (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libgazebo_rendering.so.11.12.0)
==1115==    by 0x5688816: gazebo::rendering::init() (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libgazebo_rendering.so.11.12.0)
==1115==    by 0x54C971D: gazebo::sensors::init() (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libgazebo_sensors.so.11.12.0)
==1115==    by 0x48B7E4B: gazebo::setupServer(int, char**) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libgazebo.so.11.12.0)
==1115==    by 0x48AA3DF: gazebo::Server::ParseArgs(int, char**) (in /home/traversaro/mambaforge/envs/gazebo1112/lib/libgazebo.so.11.12.0)
==1115==    by 0x113B91: ??? (in /home/traversaro/mambaforge/envs/gazebo1112/bin/gzserver-11.12.0)
==1115==    by 0x522DD8F: (below main) (libc_start_call_main.h:58)
==1115==
{
   <insert_a_suppression_name_here>
   Memcheck:Cond
   fun:_ZN4Ogre8RTShader15ShaderGenerator17setTargetLanguageERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEf
   fun:_ZN6gazebo9rendering14RTShaderSystem4InitEv
   fun:_ZN6gazebo9rendering12RenderEngine4InitEv
   fun:_ZN6gazebo9rendering4initEv
   fun:_ZN6gazebo7sensors4initEv
   fun:_ZN6gazebo11setupServerEiPPc
   fun:_ZN6gazebo6Server9ParseArgsEiPPc
   obj:/home/traversaro/mambaforge/envs/gazebo1112/bin/gzserver-11.12.0
   fun:(below main)
}

[Msg] Loading world file [/home/traversaro/mambaforge/envs/gazebo1112/share/gazebo-11/worlds/empty.world]
traversaro commented 1 year ago

I also tried to re-compiled all Gazebo and ignition dependencies, both in Release and in Debug, and the problem is still there.

traversaro commented 1 year ago

I wondered if the problem was related to the clang version, but I tried with both clang 12 and clang 13 and the result was the same.

This was quite unlucky. After a week of trying different combination of the dependencies, I reached a point in which I reproduced almost exactly the environment that built the latest working binary (gazebo 11.9.1), and even in that case it was not working. At that point, I checked the info/hash_input.json file in the package, and I noticed that the compiler used in that case was clang 11 . After trying with clang 11 in several combination, gazebo was always working. So it seems there is some kind of problem in clang 12/13/13, or some problem in Gazebo that becames apparent only with clang 12/13/14 .

Tobias-Fischer commented 1 year ago

Oh no, that is unlucky! And not very satisfying either as those compiler differences are near impossible to debug. Thanks a lot for your efforts!