mooch443 / trex

TRex, a fast multi-animal tracking system with markerless identification, and 2D estimation of posture and visual fields.
https://trex.run
GNU General Public License v3.0
81 stars 8 forks source link

TRex fails to launch on MacOS after installation #217

Closed givitelli closed 5 months ago

givitelli commented 7 months ago

Describe the bug Hi! I am trying to use TRex on a MacOS Ventura 13.5 with Apple M1 Chip. Everything seems to install successfully (I followed install directions for MacOS using miniforge). However, when I activate my tracking environment and go to launch trex or tgrabs, I get an error 'dyld[4960]: missing symbol called' and an apple problem report window opens up saying 'TRex quit unexpectedly'. I installed the beta version using the installer, through the beta environment I was able to open the GUI for trgrabs/trex and open a video to track, but when I went to track the video the GUI would again quit unexpectedly. I'd like to not use the beta version so I want to focus on trying to get the normal install to launch. I tried updating trex which did not work. ChatGPT told me to reinstall gnutls package and check that the value of the DYLD_LIBRARY_PATH environment variable was not set, I did both of those and the error did not resolve.

To Reproduce Steps to reproduce the behavior:

  1. Install trex using provided installation instructions for MacOS, Apple Silicone.
  2. In terminal, 'conda activate tracking' to open tracking environment
  3. in tracking environment, 'trex' or 'tgrabs' to launch or 'trex -i videoname -s' to open a video
  4. Launch fails for both, same error for both

If possible, please also include the full terminal output as a file attachment.

terminal output: Last login: Thu Jan 18 13:39:48 on ttys000 (base) ablab@SOMHGE-AB-iMac1 ~ % conda activate tracking (tracking) ablab@SOMHGE-AB-iMac1 ~ % trex Using conda prefix '/Users/ablab/miniforge3/envs/tracking/bin/'. Calling '/Users/ablab/miniforge3/envs/tracking/bin/TRex.app/Contents/MacOS/TRex'... dyld[4960]: missing symbol called

Apple Problem Report: problem_report.txt

Expected behavior (if it is not a simple crash) With normal installation, I expected trex or tgrabs to launch.

Computer (please complete the following information):

Thank you so much !!

mooch443 commented 7 months ago

Hey! I can only see that there's something going on with ffmpeg and loading symbols. Maybe some conda repository was updated with a different ffmpeg version than the software supports?

Could you provide the conda list of your environment? In any case, there'll be a new beta out soon which will hopefully not be as brittle :)

givitelli commented 7 months ago

Could you provide the conda list of your environment? In any case, there'll be a new beta out soon which will hopefully not be as brittle :)

Yes! Here is the terminal output from 'conda list' (both within my 'tracking' environment and the base environment)

Last login: Tue Jan 30 18:06:58 on ttys000 (base) ablab@SOMHGE-AB-iMac1 ~ % conda activate tracking (tracking) ablab@SOMHGE-AB-iMac1 ~ % conda list

packages in environment at /Users/ablab/miniforge3/envs/tracking:

#

Name Version Build Channel

abseil-cpp 20230802.0 h313beb8_2
absl-py 2.0.0 pypi_0 pypi aom 3.3.0 h07bb92c_1 conda-forge archspec 0.2.1 pyhd3eb1b0_0
astunparse 1.6.3 pypi_0 pypi blas 1.0 openblas
blas-devel 3.9.0 16_osxarm64_openblas conda-forge boltons 23.0.0 py39hca03da5_0
brotli-python 1.0.9 py39hc377ac9_7
bzip2 1.0.8 h620ffc9_4
c-ares 1.19.1 h80987f9_0
ca-certificates 2023.12.12 hca03da5_0
cachetools 5.3.2 pypi_0 pypi certifi 2023.11.17 py39hca03da5_0
cffi 1.16.0 py39h80987f9_0
charset-normalizer 2.0.4 pyhd3eb1b0_0
conda 23.11.0 py39hca03da5_0
conda-libmamba-solver 23.12.0 pyhd3eb1b0_1
conda-package-handling 2.2.0 py39hca03da5_0
conda-package-streaming 0.9.0 py39hca03da5_0
cryptography 41.0.7 py39hd4332d6_0
distro 1.8.0 py39hca03da5_0
ffmpeg 4.4.2 h4556347_0 conda-forge flatbuffers 23.5.26 pypi_0 pypi fmt 9.1.0 h48ca7d4_0
freetype 2.12.1 h1192e45_0
gast 0.5.4 pypi_0 pypi gettext 0.21.0 h13f89a0_1
giflib 5.2.1 h1a8c8d9_3 conda-forge gmp 6.2.1 hc377ac9_3
gnutls 3.7.6 h653af08_2 conda-forge google-auth 2.26.2 pypi_0 pypi google-auth-oauthlib 1.2.0 pypi_0 pypi google-pasta 0.2.0 pypi_0 pypi grpc-cpp 1.48.2 hc60591f_4
grpcio 1.60.0 pypi_0 pypi gtest 1.14.0 h48ca7d4_0
h5py 3.6.0 py39h7fe8675_0
hdf5 1.12.1 h05c076b_3
icu 73.1 h313beb8_0
idna 3.4 py39hca03da5_0
importlib-metadata 7.0.1 pypi_0 pypi joblib 1.2.0 py39hca03da5_0
jpeg 9e h1a8c8d9_3 conda-forge jsonpatch 1.32 pyhd3eb1b0_0
jsonpointer 2.1 pyhd3eb1b0_0
keras 2.15.0 pypi_0 pypi keras-preprocessing 1.1.2 pyhd3eb1b0_0
krb5 1.20.1 hf3e1bf2_1
lame 3.100 h1a28f6b_0
lcms2 2.12 hba8e193_0
lerc 3.0 hc377ac9_0
libarchive 3.6.2 h62fee54_2
libblas 3.9.0 16_osxarm64_openblas conda-forge libcblas 3.9.0 16_osxarm64_openblas conda-forge libclang 16.0.6 pypi_0 pypi libcurl 8.5.0 h3e2b118_0
libcxx 14.0.6 h848a8c0_0
libdeflate 1.17 h80987f9_1
libedit 3.1.20230828 h80987f9_0
libev 4.33 h1a28f6b_1
libffi 3.4.4 hca03da5_0
libgfortran 5.0.0 11_3_0_hca03da5_28
libgfortran5 11.3.0 h009349e_28
libiconv 1.16 h1a28f6b_2
libidn2 2.3.4 h80987f9_0
liblapack 3.9.0 16_osxarm64_openblas conda-forge liblapacke 3.9.0 16_osxarm64_openblas conda-forge libmamba 1.5.6 h15e39b3_0
libmambapy 1.5.6 py39h1c5506f_0
libnghttp2 1.57.0 h62f6fdd_0
libopenblas 0.3.21 h269037a_0
libpng 1.6.39 h80987f9_0
libprotobuf 3.20.3 h514c7bf_0
libsolv 0.7.24 h514c7bf_0
libsqlite 3.44.2 h091b4b1_0 conda-forge libssh2 1.10.0 h02f6b3c_2
libtasn1 4.19.0 h80987f9_0
libtiff 4.5.1 h313beb8_0
libunistring 0.9.10 h1a28f6b_0
libvpx 1.11.0 hc377ac9_0
libwebp 1.3.2 ha3663a8_0
libwebp-base 1.3.2 hb547adb_0 conda-forge libxml2 2.10.4 h0dcf63f_1
libzlib 1.2.13 h53f4e23_5 conda-forge llvm-openmp 14.0.6 hc6e5704_0
lz4-c 1.9.4 h313beb8_0
markdown 3.5.2 pypi_0 pypi markupsafe 2.1.3 pypi_0 pypi menuinst 2.0.1 py39hca03da5_1
ml-dtypes 0.2.0 pypi_0 pypi ncurses 6.4 h313beb8_0
nettle 3.7.3 h84b5d62_1
nomkl 3.0 0
numpy 1.26.3 pypi_0 pypi oauthlib 3.2.2 pypi_0 pypi openblas 0.3.21 hca03da5_0
openblas-devel 0.3.21 hca03da5_0
openh264 2.1.1 h98b2900_0
openjpeg 2.5.0 hbc2ba62_2 conda-forge openssl 3.2.0 h0d3ecfb_1 conda-forge opt-einsum 3.3.0 pypi_0 pypi packaging 23.2 pypi_0 pypi pcre2 10.42 hb066dcc_0
pillow 10.0.1 py39h3b245a6_0
pip 23.3.1 py39hca03da5_0
platformdirs 3.10.0 py39hca03da5_0
pluggy 1.0.0 py39hca03da5_1
protobuf 4.23.4 pypi_0 pypi pyasn1 0.5.1 pypi_0 pypi pyasn1-modules 0.3.0 pypi_0 pypi pybind11-abi 4 hd3eb1b0_1
pycosat 0.6.6 py39h80987f9_0
pycparser 2.21 pyhd3eb1b0_0
pyopenssl 23.2.0 py39hca03da5_0
pysocks 1.7.1 py39hca03da5_0
python 3.9.18 hfa1ae8a_0_cpython conda-forge python_abi 3.9 4_cp39 conda-forge re2 2022.04.01 hc377ac9_0
readline 8.2 h1a28f6b_0
reproc 14.2.4 hc377ac9_1
reproc-cpp 14.2.4 hc377ac9_1
requests 2.31.0 py39hca03da5_0
requests-oauthlib 1.3.1 pypi_0 pypi rsa 4.9 pypi_0 pypi ruamel.yaml 0.17.21 py39h1a28f6b_0
ruamel.yaml.clib 0.2.7 py39h0f82c59_2 conda-forge scikit-learn 1.3.0 py39h46d7db6_1
scipy 1.11.4 py39h20cbe94_0
setuptools 68.2.2 py39hca03da5_0
six 1.16.0 pyhd3eb1b0_1
svt-av1 1.1.0 hbe31e94_1 conda-forge tensorboard 2.15.1 pypi_0 pypi tensorboard-data-server 0.7.2 pypi_0 pypi tensorflow-deps 2.9.0 0 apple tensorflow-estimator 2.15.0 pypi_0 pypi tensorflow-io-gcs-filesystem 0.34.0 pypi_0 pypi tensorflow-macos 2.15.0 pypi_0 pypi tensorflow-metal 1.1.0 pypi_0 pypi termcolor 2.4.0 pypi_0 pypi threadpoolctl 2.2.0 pyh0d69192_0
tk 8.6.12 hb8d0fd4_0
tqdm 4.65.0 py39h86d0a89_0
trex 1.1.9 g4ce4be1_0 trexing typing-extensions 4.9.0 pypi_0 pypi tzdata 2023d h04d1e81_0
urllib3 1.26.18 py39hca03da5_0
werkzeug 3.0.1 pypi_0 pypi wheel 0.41.2 py39hca03da5_0
wrapt 1.14.1 py39h1a28f6b_0
x264 1!161.3030 h3422bc3_1 conda-forge x265 3.5 hbc6ce65_3 conda-forge xz 5.4.5 h80987f9_0
yaml-cpp 0.8.0 h313beb8_0
zipp 3.17.0 pypi_0 pypi zlib 1.2.13 h53f4e23_5 conda-forge zstandard 0.19.0 py39h80987f9_0
zstd 1.5.5 hd90d995_0
(tracking) ablab@SOMHGE-AB-iMac1 ~ % conda activate base (base) ablab@SOMHGE-AB-iMac1 ~ % conda list

packages in environment at /Users/ablab/miniforge3:

#

Name Version Build Channel

attrs 23.1.0 py310hca03da5_0
beautifulsoup4 4.12.2 py310hca03da5_0
boltons 23.1.1 pyhd8ed1ab_0 conda-forge brotli-python 1.1.0 py310h1253130_1 conda-forge bzip2 1.0.8 h93a5062_5 conda-forge c-ares 1.25.0 h93a5062_0 conda-forge ca-certificates 2023.12.12 hca03da5_0
cctools 949.0.1 hc179dcd_25
cctools_osx-arm64 949.0.1 h332cad3_25
certifi 2023.11.17 py310hca03da5_0
cffi 1.16.0 py310hdcd7c05_0 conda-forge chardet 4.0.0 py310hca03da5_1003
charset-normalizer 3.3.2 pyhd8ed1ab_0 conda-forge click 8.1.7 py310hca03da5_0
colorama 0.4.6 pyhd8ed1ab_0 conda-forge conda 23.3.1 py310hbe9552e_0 conda-forge conda-build 3.28.4 py310hca03da5_0
conda-index 0.3.0 py310hca03da5_0
conda-libmamba-solver 23.3.0 pyhd8ed1ab_0 conda-forge conda-package-handling 2.2.0 pyh38be061_0 conda-forge conda-package-streaming 0.9.0 pyhd8ed1ab_0 conda-forge cryptography 41.0.7 py310h4c55245_1 conda-forge filelock 3.13.1 py310hca03da5_0
fmt 9.1.0 hffc8910_0 conda-forge icu 73.2 hc8870d7_0 conda-forge idna 3.6 pyhd8ed1ab_0 conda-forge jinja2 3.1.2 py310hca03da5_0
jsonpatch 1.33 pyhd8ed1ab_0 conda-forge jsonpointer 2.4 py310hbe9552e_3 conda-forge jsonschema 4.19.2 py310hca03da5_0
jsonschema-specifications 2023.7.1 py310hca03da5_0
krb5 1.21.2 h92f50d5_0 conda-forge ld64 530 hb29bf3f_25
ld64_osx-arm64 530 h001ce53_25
ldid 2.1.5 h20b2a84_3
libarchive 3.6.2 h82b9b87_1 conda-forge libcurl 8.5.0 h2d989ff_0 conda-forge libcxx 16.0.6 h4653b0c_0 conda-forge libedit 3.1.20191231 hc8eb9b7_2 conda-forge libev 4.33 h93a5062_2 conda-forge libffi 3.4.2 h3422bc3_5 conda-forge libiconv 1.17 h0d3ecfb_2 conda-forge liblief 0.12.3 h313beb8_0
libllvm14 14.0.6 hd1a9a77_4 conda-forge libmamba 1.4.2 h7d1d596_0 conda-forge libmambapy 1.4.2 py310h34b6e76_0 conda-forge libnghttp2 1.58.0 ha4dd798_1 conda-forge libsolv 0.7.27 h9e231a4_0 conda-forge libsqlite 3.44.2 h091b4b1_0 conda-forge libssh2 1.11.0 h7a5bd25_0 conda-forge libxml2 2.12.4 h0d0cfa8_1 conda-forge libzlib 1.2.13 h53f4e23_5 conda-forge lz4-c 1.9.4 hb7217d7_0 conda-forge lzo 2.10 h642e427_1000 conda-forge mamba 1.4.2 py310ha5d4528_0 conda-forge markupsafe 2.1.3 py310h80987f9_0
menuinst 2.0.1 py310hca03da5_1
more-itertools 10.1.0 py310hca03da5_0
ncurses 6.4 h463b476_2 conda-forge openssl 3.2.0 h0d3ecfb_1 conda-forge packaging 23.2 pyhd8ed1ab_0 conda-forge patch 2.7.6 h1a28f6b_1001
pip 23.2.1 pyhd8ed1ab_0 conda-forge pkginfo 1.9.6 py310hca03da5_0
pluggy 1.3.0 pyhd8ed1ab_0 conda-forge psutil 5.9.0 py310h1a28f6b_0
py-lief 0.12.3 py310h313beb8_0
pybind11-abi 4 hd8ed1ab_3 conda-forge pycosat 0.6.6 py310h2aa6e3c_0 conda-forge pycparser 2.21 pyhd8ed1ab_0 conda-forge pyopenssl 23.3.0 pyhd8ed1ab_0 conda-forge pysocks 1.7.1 pyha2e5f31_6 conda-forge python 3.10.12 h01493a6_0_cpython conda-forge python-libarchive-c 2.9 pyhd3eb1b0_1
python_abi 3.10 4_cp310 conda-forge pytz 2023.3.post1 py310hca03da5_0
pyyaml 6.0.1 py310h80987f9_0
readline 8.2 h92ec313_1 conda-forge referencing 0.30.2 py310hca03da5_0
reproc 14.2.4.post0 h93a5062_1 conda-forge reproc-cpp 14.2.4.post0 h965bd2d_1 conda-forge requests 2.31.0 pyhd8ed1ab_0 conda-forge rpds-py 0.10.6 py310hf0e4da2_0
ruamel.yaml 0.17.40 py310hd125d64_0 conda-forge ruamel.yaml.clib 0.2.7 py310h2aa6e3c_2 conda-forge setuptools 69.0.3 pyhd8ed1ab_0 conda-forge soupsieve 2.5 py310hca03da5_0
tapi 1100.0.11 h8754e6a_1
tk 8.6.13 h5083fa2_1 conda-forge tomli 2.0.1 py310hca03da5_0
toolz 0.12.0 pyhd8ed1ab_0 conda-forge tqdm 4.66.1 pyhd8ed1ab_0 conda-forge tzdata 2023d h0c530f3_0 conda-forge urllib3 2.1.0 pyhd8ed1ab_0 conda-forge wheel 0.42.0 pyhd8ed1ab_0 conda-forge xz 5.2.6 h57fd34a_0 conda-forge yaml 0.2.5 h1a28f6b_0
yaml-cpp 0.7.0 h13dd4ca_3 conda-forge zstandard 0.22.0 py310h6289e41_0 conda-forge zstd 1.5.5 h4f39d0f_0 conda-forge (base) ablab@SOMHGE-AB-iMac1 ~ %

mooch443 commented 6 months ago

Just got back from field-work ... :) Oh, I am sorry. You are using Ventura 13.5? I think this may be the issue. Although it is difficult for me to find out which exact function is triggering the incompatibility - I only have machines with macOS 14 and above... Does this also happen if you start the program with

trex -i video.pv -nowindow

? That would at least narrow it down to "opening a window and rendering graphics into it.

Although this is a very weird thing since I am compiling all Mac versions for >=11.0 and would expect the compiler to throw an error if I am using newer features. Hm. Does the beta version work?

conda create -n beta_test --override-channels -c trex-beta -c pytorch -c conda-forge trex

and then try running it

trex

Thanks for checking and your patience! :)

givitelli commented 6 months ago

Hi! Thanks for your response, here's the results of these suggestions:

You are using Ventura 13.5? Yes, I am.

Does this also happen if you start the program with

trex -i video.pv -nowindow

Yes, it still happens when I try this.

Does the beta version work? I did try the beta version previously (I used the installer provided in the docs), and was able to get the GUI open but for some reason the GUI would crash when I tried to track videos. However, trying it now with the code you provided, the beta test version works!

I'll just use this beta version moving forward. Thanks so much for your help!

mooch443 commented 5 months ago

You should probably update that version every now and again and switch to main channel once I push it. Just to be sure that things are working as intended - there used to be some bugs in some version related to the data output, so be careful. Right now at least I don't know of any. Cheers!