Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inserting any iCub model into Gazebo world crashes Gazebo with FatalException #1253

Closed
nunoguedelha opened this issue Sep 8, 2022 · 2 comments

Comments

@nunoguedelha
Copy link
Collaborator

Steps for reproducing the issue...

  • Install Gazebo and build the superbuild
conda create -n robenv
conda activate robenv
mamba update --all
mamba install -c conda-forge gazebo=11.9.1
mamba install -c conda-forge cmake compilers make ninja pkg-config
mamba install -c conda-forge ace asio assimp boost eigen freetype gazebo glew glfw glm graphviz gsl ipopt irrlicht libjpeg-turbo libmatio libode libxml2 nlohmann_json opencv pkg-config portaudio sdl sdl2 sqlite tinyxml spdlog lua soxr
cd ~/dev
git clone https://github.com/robotology/robotology-superbuild
cd robotology-superbuild
mkdir build
cd build
cmake ..
cmake --build . --config Release --target update-all
cmake --build . --config Release
  • run Gazebo
gazebo --verbose
  • insert an iCub model (e.g. iCubGazeboV3)
    => Gazebo crashes with the error:
[libprotobuf ERROR google/protobuf/descriptor_database.cc:559] Invalid file descriptor data passed to EncodedDescriptorDatabase::Add().
[libprotobuf FATAL google/protobuf/descriptor.cc:1357] CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size):
libc++abi.dylib: terminating with uncaught exception of type google::protobuf::FatalException: CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size):

Details

  • When installing the superbuild dependencies through conda, we dropped qt-main.
  • Superbuild options set through ccmake interface:
 ROBOTOLOGY_ENABLE_DYNAMICS       ON
 ROBOTOLOGY_ENABLE_DYNAMICS_FUL   ON
 ROBOTOLOGY_PROJECT_TAGS          Stable
 ROBOTOLOGY_USES_MATLAB           ON
conda info:
     active environment : robotologydeps3
    active env location : /Users/nunoguedelha/miniforge3/envs/robotologydeps3
            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.13.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.13 Darwin/19.6.0 OSX/10.15.7
                UID:GID : 501:20
             netrc file : None
           offline mode : False
conda list:
# packages in environment at /Users/nunoguedelha/miniforge3/envs/robotologydeps3:
#
# Name                    Version                   Build  Channel
ace                       7.0.8                hb486fe8_0    conda-forge
ampl-mp                   3.1.0             h2beb688_1006    conda-forge
asio                      1.24.0               h4da505d_0    conda-forge
assimp                    5.0.1                h1224e73_7    conda-forge
atk-1.0                   2.36.0               he69c4ee_4    conda-forge
blosc                     1.21.1               h97e831e_3    conda-forge
boost                     1.74.0          py310h509978a_5    conda-forge
boost-cpp                 1.74.0               hdbf7018_7    conda-forge
bullet-cpp                3.17                 hcc25f39_1    conda-forge
bzip2                     1.0.8                h0d85af4_4    conda-forge
c-ares                    1.18.1               h0d85af4_0    conda-forge
c-compiler                1.5.0                hbf74d83_0    conda-forge
ca-certificates           2022.6.15            h033912b_0    conda-forge
cairo                     1.16.0            he01c77b_1009    conda-forge
cctools                   973.0.1             h76f1dac_10    conda-forge
cctools_osx-64            973.0.1             h2b95895_10    conda-forge
cfitsio                   4.1.0                h2c97ad1_0    conda-forge
clang                     14.0.4               h694c41f_0    conda-forge
clang-14                  14.0.4          default_h55ffa42_0    conda-forge
clang_osx-64              14.0.4               h3a95cd4_2    conda-forge
clangxx                   14.0.4          default_h55ffa42_0    conda-forge
clangxx_osx-64            14.0.4               he1dbc44_2    conda-forge
cmake                     3.24.1               h5291bba_0    conda-forge
compiler-rt               14.0.4               h7fcd477_0    conda-forge
compiler-rt_osx-64        14.0.4               h6df654d_0    conda-forge
compilers                 1.5.0                h694c41f_0    conda-forge
console_bridge            1.0.2                hbb4e6a2_1    conda-forge
cppzmq                    4.8.1                hf09c4ce_0    conda-forge
curl                      7.83.1               h23f1065_0    conda-forge
cxx-compiler              1.5.0                hb8565cd_0    conda-forge
dartsim                   6.12.1               h110914a_0    conda-forge
eigen                     3.4.0                h940c156_0    conda-forge
expat                     2.4.8                h96cf925_0    conda-forge
fcl                       0.7.0                h31ff308_0    conda-forge
ffmpeg                    4.3.2                hbf27d7b_3    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.13.94              h10f422b_0    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
fortran-compiler          1.5.0                h14ada62_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.9.1               ha2fdce5_2    conda-forge
gdbm                      1.18                 h8a0c380_2    conda-forge
gdk-pixbuf                2.42.8               hb161b9c_0    conda-forge
geos                      3.10.2               he49afe7_0    conda-forge
geotiff                   1.7.1                had63758_1    conda-forge
gettext                   0.19.8.1          hd1a6beb_1008    conda-forge
gfortran                  11.3.0               h2c809b3_0    conda-forge
gfortran_impl_osx-64      9.5.0               h2221f41_25    conda-forge
gfortran_osx-64           9.5.0                h18f7dce_0    conda-forge
giflib                    5.2.1                hbcb3906_2    conda-forge
glew                      2.1.0                h046ec9c_2    conda-forge
glfw                      3.3.8                hac89ed1_0    conda-forge
glm                       0.9.9.4              h1b54a9f_2    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               h2b5222e_2    conda-forge
gsl                       2.7                  h93259b0_0    conda-forge
gtk2                      2.24.33              h7c1209e_2    conda-forge
gts                       0.7.6                hccb3bdf_2    conda-forge
harfbuzz                  3.4.0                h447b35c_0    conda-forge
hdf4                      4.2.15               h0623a88_4    conda-forge
hdf5                      1.12.1          nompi_h0aa1fa2_104    conda-forge
icu                       69.1                 he49afe7_0    conda-forge
imath                     3.1.5                hd9580d2_0    conda-forge
ipopt                     3.14.9               h069150e_1    conda-forge
irrlicht                  1.8.5                he00d70a_2    conda-forge
isl                       0.22.1               hb1e8313_2    conda-forge
jasper                    2.0.33               h013e400_0    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               hb98e516_0    conda-forge
lame                      3.100             h35c211d_1001    conda-forge
lcms2                     2.12                 h577c468_0    conda-forge
ld64                      609                 hc6ad406_10    conda-forge
ld64_osx-64               609                 h1e06c2b_10    conda-forge
lerc                      4.0.0                hb486fe8_0    conda-forge
libblas                   3.9.0           16_osx64_openblas    conda-forge
libcblas                  3.9.0           16_osx64_openblas    conda-forge
libccd                    2.1                  he49afe7_1    conda-forge
libclang                  13.0.1          default_he082bbe_0    conda-forge
libclang-cpp14            14.0.4          default_h55ffa42_0    conda-forge
libcurl                   7.83.1               h23f1065_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                hb8742e1_1    conda-forge
libgdal                   3.4.2                ha663369_6    conda-forge
libgfortran               5.0.0           10_4_0_h97931a8_25    conda-forge
libgfortran-devel_osx-64  9.5.0               hc2d6858_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
libignition-cmake2        2.15.0               hf0c8a7f_0    conda-forge
libignition-common3       3.13.2               h39c3357_1    conda-forge
libignition-fuel-tools4   4.4.0                h1699cbd_6    conda-forge
libignition-math6         6.11.0          py310h9fb7402_1    conda-forge
libignition-msgs5         5.7.0                h08ae71b_2    conda-forge
libignition-tools1        1.5.0                hd8dcec6_0    conda-forge
libignition-transport8    8.1.0               h4b67353_10    conda-forge
libjpeg-turbo             2.1.3                hac89ed1_0    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
libllvm13                 13.0.1               h64f94b2_2    conda-forge
libllvm14                 14.0.4               h41df66c_0    conda-forge
libmatio                  1.5.23               hb7ac2cd_0    conda-forge
libnetcdf                 4.8.1           nompi_h6609ca0_102    conda-forge
libnghttp2                1.47.0               h5aae05b_1    conda-forge
libode                    0.16.2              h9d931ec_10    conda-forge
libopenblas               0.3.21          openmp_h429af6e_3    conda-forge
libopencv                 4.5.5            py31h1f8f45b_4    conda-forge
libpng                    1.6.37               h5481273_4    conda-forge
libpq                     14.2                 h8ce7ee7_0    conda-forge
libprotobuf               3.19.4               hcf210ce_0    conda-forge
libraw                    0.20.2               hefd3b78_1    conda-forge
librsvg                   2.52.5               h5e5d7d9_2    conda-forge
librttopo                 1.1.0                hec60dd8_9    conda-forge
libsdformat               9.3.0                h6955478_5    conda-forge
libsodium                 1.0.18               hbcb3906_1    conda-forge
libspatialite             5.0.1               hadde3e2_15    conda-forge
libsqlite                 3.39.3               ha978bb4_0    conda-forge
libssh2                   1.10.0               h47af595_3    conda-forge
libtar                    1.2.20            h0d85af4_1004    conda-forge
libtiff                   4.4.0                h5e0c7b4_3    conda-forge
libtool                   2.4.6             he49afe7_1008    conda-forge
libusb                    1.0.26             hc2f2c32_100    conda-forge
libuv                     1.44.2               hac89ed1_0    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.12               h7e28ab6_1    conda-forge
libzip                    1.9.2                h6db710c_1    conda-forge
libzlib                   1.2.12               hfe4f2af_2    conda-forge
llvm-openmp               14.0.4               ha654fa7_0    conda-forge
llvm-tools                14.0.4               h41df66c_0    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_11    conda-forge
mumps-seq                 5.2.1               hea8e22a_11    conda-forge
mysql-common              8.0.30               hc4b2c72_1    conda-forge
mysql-libs                8.0.30               h8658499_1    conda-forge
ncurses                   6.3                  h96cf925_1    conda-forge
nettle                    3.6                  hedd7734_0    conda-forge
ninja                     1.11.0               h1b54a9f_0    conda-forge
nlohmann_json             3.11.2               hbbd2c75_0    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
opencv                    4.5.5            py31h2ec42d9_4    conda-forge
openexr                   3.1.5                h6fbc5c6_0    conda-forge
openh264                  2.1.1                hfd3ada9_0    conda-forge
openjpeg                  2.4.0                h6e7aa92_1    conda-forge
openssl                   3.0.5                hfd90126_2    conda-forge
pango                     1.50.3               h7f27720_0    conda-forge
pcre                      8.45                 he49afe7_0    conda-forge
pip                       22.2.2             pyhd8ed1ab_0    conda-forge
pixman                    0.40.0               hbcb3906_0    conda-forge
pkg-config                0.29.2            ha3d46e9_1008    conda-forge
poppler                   22.01.0              h9573804_0    conda-forge
poppler-data              0.4.11               hd8ed1ab_0    conda-forge
portaudio                 19.6.0               hf0c8a7f_6    conda-forge
postgresql                14.2                 h0fd25fa_0    conda-forge
proj                      9.0.0                h2364a93_1    conda-forge
pthread-stubs             0.4               hc929b4f_1001    conda-forge
pugixml                   1.11.4               he49afe7_0    conda-forge
py-opencv                 4.5.5            py31ha188af9_4    conda-forge
pybind11-abi              4                    hd8ed1ab_3    conda-forge
python                    3.10.6          hc14f532_0_cpython    conda-forge
python_abi                3.10                    2_cp310    conda-forge
qt                        5.12.9               h2a607e2_5    conda-forge
qwt                       6.2.0                h0f3c874_2    conda-forge
readline                  8.1.2                h3899abd_0    conda-forge
rhash                     1.4.3                hac89ed1_0    conda-forge
ruby                      3.1.2                hcaea9d7_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
sigtool                   0.1.3                h88f4db0_0    conda-forge
simbody                   3.7                  h43072b6_3    conda-forge
snappy                    1.1.9                h6e38e02_1    conda-forge
soxr                      0.1.3                had99412_2    conda-forge
spdlog                    1.10.0               hbb4e6a2_0    conda-forge
sqlite                    3.39.3               h9ae0607_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.8.3                h349c43f_1    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
tzcode                    2022c                h775f41a_0    conda-forge
tzdata                    2022c                h191b570_0    conda-forge
unixodbc                  2.3.10               h7b58acd_0    conda-forge
urdfdom                   2.3.5                h940c156_0    conda-forge
urdfdom_headers           1.1.0                h1b54a9f_0    conda-forge
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
x264                      1!161.3030           h0d85af4_1    conda-forge
xerces-c                  3.2.3                h6564042_4    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
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
Copy link
Collaborator Author

The Protobuf headers and libraries were 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 added to the CMake command line DCMAKE_PREFIX_PATH=$CONDA_PREFIX to force CMake to find protobuf in conda environment.

I now get the CMake config:

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

Rebuilding...

@traversaro
Copy link
Member

I guess this was fixed by rebuilding against the correct libprotobuf libraries, if anyone is still experiencing this issue, please open a new issue, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants