conda-forge / gazebo-feedstock

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

Gazebo client hangs on open on Windows #184

Open johnwason opened 10 months ago

johnwason commented 10 months ago

Solution to issue cannot be found in the documentation.

Issue

gazebo client will hang on open intermittently on Windows with the most recent 11.13 builds. It will start up normally for a few times, and then will randomly refuse to start several times, until randomly starting normally again. I tried installing version 11.12 and it seems to work normally. I tested in a clean environment with no other packages installed beyond gazebo and its dependencies.

It looks similar to this problem: https://github.com/ms-iot/ROSOnWindows/issues/47

This problem is intermittent so it is very difficult to determine what conditions cause it.

Installed packages

aom                       3.5.0                h63175ca_0    conda-forge
assimp                    5.2.5                h4dcb625_0    conda-forge
blosc                     1.21.4               hdccc3a2_0    conda-forge
boost-cpp                 1.78.0               h9f4b32c_4    conda-forge
bzip2                     1.0.8                h8ffe710_4    conda-forge
c-ares                    1.19.1               hcfcfb64_0    conda-forge
ca-certificates           2023.7.22            h56e8100_0    conda-forge
cairo                     1.16.0            hdecc03f_1016    conda-forge
cfitsio                   4.3.0                h9b0cee5_0    conda-forge
console_bridge            1.0.2                h5362a0b_1    conda-forge
cppzmq                    4.10.0               h449d27f_0    conda-forge
dav1d                     1.2.1                hcfcfb64_0    conda-forge
dirent                    1.21                          0    conda-forge
dlfcn-win32               1.3.0                h0e60522_0    conda-forge
eigen                     3.4.0                h91493d7_0    conda-forge
expat                     2.5.0                h63175ca_1    conda-forge
ffmpeg                    6.0.0           gpl_h1f67d4f_104    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.2               hbde0cde_0    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
freeimage                 3.18.0              hcff1195_15    conda-forge
freetype                  2.12.1               h546665d_1    conda-forge
freexl                    1.0.6                h67ca5e6_1    conda-forge
fribidi                   1.0.10               h8d14728_0    conda-forge
gazebo                    11.13.0              h1fde3ec_4    conda-forge
geos                      3.12.0               h1537add_0    conda-forge
geotiff                   1.7.1               h4e61e90_11    conda-forge
getopt-win32              0.1                  h8ffe710_0    conda-forge
gettext                   0.21.1               h5728263_0    conda-forge
glib                      2.76.4               h12be248_0    conda-forge
glib-tools                2.76.4               h12be248_0    conda-forge
graphite2                 1.3.13                     1000    conda-forge
graphviz                  8.1.0                h51cb2cd_0    conda-forge
gst-plugins-base          1.22.5               h001b923_0    conda-forge
gstreamer                 1.22.5               hb4038d2_0    conda-forge
gts                       0.7.6                h6b5321d_4    conda-forge
harfbuzz                  7.3.0                h196d34a_0    conda-forge
hdf4                      4.2.15               h1334946_6    conda-forge
hdf5                      1.14.1          nompi_h73e8ff5_100    conda-forge
icu                       72.1                 h63175ca_0    conda-forge
imath                     3.1.8                h12be248_0    conda-forge
intel-openmp              2023.2.0         h57928b3_49496    conda-forge
jsoncpp                   1.9.5                h2d74725_1    conda-forge
jxrlib                    1.1                  h8ffe710_2    conda-forge
kealib                    1.5.1                h96def13_4    conda-forge
krb5                      1.21.2               heb0366b_0    conda-forge
lcms2                     2.15                 h3e3b177_1    conda-forge
lerc                      4.0.0                h63175ca_0    conda-forge
libabseil                 20230125.3      cxx17_h63175ca_0    conda-forge
libaec                    1.0.6                h63175ca_1    conda-forge
libarchive                3.6.2                h6f8411a_1    conda-forge
libblas                   3.9.0              17_win64_mkl    conda-forge
libcblas                  3.9.0              17_win64_mkl    conda-forge
libccd-double             2.1                  h63175ca_3    conda-forge
libclang                  15.0.7          default_h77d9078_3    conda-forge
libclang13                15.0.7          default_h77d9078_3    conda-forge
libcrc32c                 1.1.2                h0e60522_0    conda-forge
libcurl                   8.2.1                hd5e4a3a_0    conda-forge
libdeflate                1.18                 hcfcfb64_0    conda-forge
libexpat                  2.5.0                h63175ca_1    conda-forge
libffi                    3.4.2                h8ffe710_5    conda-forge
libflang                  5.0.0           h6538335_20180525    conda-forge
libgd                     2.3.3                h2ed9e1d_6    conda-forge
libgdal                   3.7.1                h6393f06_6    conda-forge
libglib                   2.76.4               he8f3873_0    conda-forge
libgoogle-cloud           2.12.0               hbc1b25b_1    conda-forge
libgrpc                   1.56.2               hea2d5f7_1    conda-forge
libhwloc                  2.9.2           nocuda_h15da153_1008    conda-forge
libiconv                  1.17                 h8ffe710_0    conda-forge
libignition-cmake2        2.16.0               h63175ca_1    conda-forge
libignition-common3       3.15.1               hc1f3b3c_2    conda-forge
libignition-fuel-tools4   4.6.0                hd22afc4_2    conda-forge
libignition-math6         6.14.0          py311h4b297e5_0    conda-forge
libignition-msgs5         5.11.0               h401ef6a_1    conda-forge
libignition-tools1        1.5.0                hf5993cb_3    conda-forge
libignition-transport8    8.4.0                hb43e8a1_3    conda-forge
libjpeg-turbo             2.1.5.1              hcfcfb64_0    conda-forge
libkml                    1.3.0             hf2ab4e4_1015    conda-forge
libnetcdf                 4.9.2           nompi_h5902ca5_107    conda-forge
libode                    0.16.2              h12c1d0e_11    conda-forge
libogg                    1.3.4                h8ffe710_1    conda-forge
libopenblas               0.3.23          pthreads_hc140b1d_0    conda-forge
libopus                   1.3.1                h8ffe710_1    conda-forge
libpng                    1.6.39               h19919ed_0    conda-forge
libpq                     15.4                 h43585b0_0    conda-forge
libprotobuf               4.23.3               h1975477_0    conda-forge
libraw                    0.21.1               h1334946_1    conda-forge
librttopo                 1.1.0               h92c5fdb_14    conda-forge
libsdformat               9.8.0                h5ba8b87_4    conda-forge
libsodium                 1.0.18               h8d14728_1    conda-forge
libspatialite             5.0.1               hc49ff46_28    conda-forge
libsqlite                 3.43.0               hcfcfb64_0    conda-forge
libssh2                   1.11.0               h7dfc565_0    conda-forge
libtiff                   4.5.1                h6c8260b_1    conda-forge
libusb                    1.0.26             h8ffe710_100    conda-forge
libvorbis                 1.3.7                h0e60522_0    conda-forge
libwebp                   1.3.1                hcfcfb64_0    conda-forge
libwebp-base              1.3.1                hcfcfb64_0    conda-forge
libxcb                    1.15                 hcd874cb_0    conda-forge
libxml2                   2.11.5               hc3477c8_1    conda-forge
libzip                    1.10.1               h1d365fa_0    conda-forge
libzlib                   1.2.13               hcfcfb64_5    conda-forge
llvm-meta                 5.0.0                         0    conda-forge
lz4-c                     1.9.4                hcfcfb64_0    conda-forge
lzo                       2.10              he774522_1000    conda-forge
m2w64-gcc-libgfortran     5.3.0                         6    conda-forge
m2w64-gcc-libs            5.3.0                         7    conda-forge
m2w64-gcc-libs-core       5.3.0                         7    conda-forge
m2w64-gmp                 6.1.0                         2    conda-forge
m2w64-libwinpthread-git   5.0.0.4634.697f757               2    conda-forge
mkl                       2022.1.0           h6a75c08_874    conda-forge
msys2-conda-epoch         20160418                      1    conda-forge
ogre                      1.10.12             h4c42d57_11    conda-forge
openal-soft               1.22.2               h2d74725_0    conda-forge
openblas                  0.3.23          pthreads_h1956dd5_0    conda-forge
openexr                   3.1.7                h9f7af22_1    conda-forge
openh264                  2.3.1                h63175ca_2    conda-forge
openjpeg                  2.5.0                ha2aaf27_2    conda-forge
openmp                    5.0.0                    vc14_1    conda-forge
openssl                   3.1.2                hcfcfb64_0    conda-forge
pango                     1.50.14              hd64ce24_1    conda-forge
pcre2                     10.40                h17e33f8_0    conda-forge
pip                       23.2.1             pyhd8ed1ab_0    conda-forge
pixman                    0.40.0               h8ffe710_0    conda-forge
poppler                   23.08.0              h45d20d0_0    conda-forge
poppler-data              0.4.12               hd8ed1ab_0    conda-forge
postgresql                15.4                 hc80876b_0    conda-forge
proj                      9.2.1                h660b3b0_0    conda-forge
pthread-stubs             0.4               hcd874cb_1001    conda-forge
pthreads-win32            2.9.1                hfa6e2cd_3    conda-forge
pugixml                   1.13                 h63175ca_1    conda-forge
pybind11-abi              4                    hd8ed1ab_3    conda-forge
python                    3.11.5          h2628c8c_0_cpython    conda-forge
python_abi                3.11                    3_cp311    conda-forge
qt-main                   5.15.8              h063a7da_15    conda-forge
qwt                       6.2.0                h07be427_6    conda-forge
re2                       2023.03.02           hd4eee63_0    conda-forge
ruby                      3.2.2                h20ad4f3_0    conda-forge
sdl2                      2.26.5               h63175ca_0    conda-forge
setuptools                68.1.2             pyhd8ed1ab_0    conda-forge
simbody                   3.7                  hade3207_3    conda-forge
snappy                    1.1.10               hfb803bf_0    conda-forge
sqlite                    3.43.0               hcfcfb64_0    conda-forge
svt-av1                   1.7.0                h63175ca_0    conda-forge
tbb                       2021.10.0            h91493d7_0    conda-forge
tbb-devel                 2021.10.0            h91493d7_0    conda-forge
tiledb                    2.16.3               hd58e885_1    conda-forge
tiny-process-library      2.0.4                h63175ca_1    conda-forge
tinyxml                   2.6.2                h2d74725_2    conda-forge
tinyxml2                  9.0.0                h0e60522_2    conda-forge
tk                        8.6.12               h8ffe710_0    conda-forge
tzdata                    2023c                h71feb2d_0    conda-forge
ucrt                      10.0.22621.0         h57928b3_0    conda-forge
urdfdom                   3.1.1                h33150cf_0    conda-forge
urdfdom_headers           1.1.0                h5362a0b_0    conda-forge
vc                        14.3                h64f974e_17    conda-forge
vc14_runtime              14.36.32532         hfdfe4a8_17    conda-forge
vs2015_runtime            14.36.32532         h05e6639_17    conda-forge
wheel                     0.41.2             pyhd8ed1ab_0    conda-forge
x264                      1!164.3095           h8ffe710_2    conda-forge
x265                      3.5                  h2d74725_3    conda-forge
xerces-c                  3.2.4                h63175ca_3    conda-forge
xorg-kbproto              1.0.7             hcd874cb_1002    conda-forge
xorg-libice               1.1.1                hcd874cb_0    conda-forge
xorg-libsm                1.2.4                hcd874cb_0    conda-forge
xorg-libx11               1.8.6                hefa74cf_0    conda-forge
xorg-libxau               1.0.11               hcd874cb_0    conda-forge
xorg-libxdmcp             1.1.3                hcd874cb_0    conda-forge
xorg-libxext              1.3.4                hcd874cb_2    conda-forge
xorg-libxpm               3.5.16               hcd874cb_0    conda-forge
xorg-libxt                1.3.0                hcd874cb_1    conda-forge
xorg-xextproto            7.3.0             hcd874cb_1003    conda-forge
xorg-xproto               7.0.31            hcd874cb_1007    conda-forge
xz                        5.2.6                h8d14728_0    conda-forge
yaml                      0.2.5                h8ffe710_2    conda-forge
zeromq                    4.3.4                h0e60522_1    conda-forge
zlib                      1.2.13               hcfcfb64_5    conda-forge
zstd                      1.5.5                h12be248_0    conda-forge
zziplib                   0.13.69              h1d00b33_1    conda-forge

Environment info

active environment : gazebo_test
    active env location : D:\ws\conda\envs\gazebo_test
            shell level : 2
       user config file : C:\Users\user\.condarc
 populated config files : C:\Users\user\mambaforge\.condarc
                          C:\Users\user\.condarc
          conda version : 23.3.1
    conda-build version : not installed
         python version : 3.10.12.final.0
       virtual packages : __archspec=1=x86_64
                          __cuda=12.2=0
                          __win=0=0
       base environment : C:\Users\user\mambaforge  (writable)
      conda av data dir : C:\Users\user\mambaforge\etc\conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : D:\ws\conda\pkgs
       envs directories : D:\ws\conda\envs
                          C:\Users\user\mambaforge\envs
                          C:\Users\user\.conda\envs
                          C:\Users\usor\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/23.3.1 requests/2.31.0 CPython/3.10.12 Windows/10 Windows/10.0.19045
          administrator : False
             netrc file : None
           offline mode : False
traversaro commented 10 months ago

Can you describe your test environment? In a sense, are you starting gzserver and then trying to start gzclient several times, or for every test you are launching a new gzserver and gzclient?

johnwason commented 10 months ago

I was starting one instance each of the client and server at a time, using either the gazebo command or gzserver followed by gzclient. I was trying to figure out if there was an issue with gzclient connecting too soon. I also tinkered with the environmental variables for GAZEBO_IP and IGN_IP along with other variables to see if it was a networking issue. The problem may not happen with an empty world. I have been using version 11.12 without seeing this problem. I was not able to reliably reproduce it either.

johnwason commented 9 months ago

After a lot of trial and error, it appears the problem is that if the gzclient window spawns on a secondary monitor it will hang on startup. If it spawns on the main monitor, it seems to work. I have a three monitor setup so it will spawn on different screens depending on how Windows is feeling at that moment. Once the window has spawned on the main monitor it can be moved to a different monitor. The easiest solution is to disable extra monitors when using gazebo. I don't know if this is a problem with the Nvidia drivers for my RTX 3090 or if it is a problem with Ogre/Gazebo. If someone else has a multi-monitor setup it would be interesting to experiment.

johnwason commented 3 months ago

I finally found the problem!

It has something to do with NahimicOSD.dll, which is a filter driver that is inserting itself into programs to provide some kind of useless on screen display. Apparently it comes with Alienware systems, along with a lot of other computers device drivers. It is loading an old version of DirectX which is causing the problem. DirectX is not being loaded by Gazebo.

This appears to be a similar problem: https://github.com/prusa3d/PrusaSlicer/issues/5573