Social-Evolution-and-Behavior / anTraX

anTraX: high throughput tracking of color-tagged insects
https://antrax.readthedocs.io/
GNU General Public License v3.0
17 stars 3 forks source link

Error in configure step #14

Closed annahyan closed 3 years ago

annahyan commented 3 years ago

Hi,

Thanks for developing the tool! I'm getting an issue in the configure step while running on the JS16 dataset

14:51:48 -I- Reading video information from file
14:52:02 -I- opening video file JS16/videos//1_6/JS16_1.mp4
Index exceeds the number of array elements (1).
Error in ffinfo (line 30)

Error in ffreader/collectInfo (line 176)

Error in ffreader (line 59)

Error in expreader/open_vid (line 393)

Error in expreader/fetch_frame (line 338)

Error in expreader/read_frame (line 263)

Error in trhandles/read_frame (line 415)

Error in antrax/set_Trck (line 410)

Error in antrax/set_experiment (line 344)

Error in antrax/startupFcn (line 1184)

Error in appdesigner.internal.service.AppManagementService/tryCallback (line 336)

Error in matlab.apps.AppBase/runStartupFcn (line 41)

Error in antrax (line 3563)

Error in antrax_mcr_interface (line 8)
MATLAB:badsubscript

Could you please help me with this?

asafgal commented 3 years ago

Hey, thanks for trying anTraX!

It seems you have some issue with ffmpeg. Can you give me some information on your operating system version?

If you happen to run on Linux, a common issue is a version mismatch in the libstdc++.so.6 library between matlab and ffmpeg. Try preloading the system library before calling anTraX, in the following way:

export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6
antrax <antrax command>

If it works, I'll show you how to permanently fix the issue.

annahyan commented 3 years ago

Awesome, that worked! Yes, please let me know how to fix this permanently.

asafgal commented 3 years ago

Great!

To permanently resolve the issue, just remove the matlab version of the library.

For MCR:

sudo mv /usr/local/MATLAB/MATLAB_Runtime/v96/sys/os/glnxa64/libstdc++.so.6 /usr/local/MATLAB/MATLAB_Runtime/v96/sys/os/glnxa64/libstdc++.so.6.orig

For licensed matlab:

sudo mv /usr/local/MATLAB/R2019a/sys/os/glnxa64/libstdc++.so.6 /usr/local/MATLAB/R2019a/sys/os/glnxa64/libstdc++.so.6.orig

Alternatively, if you don't want to mess with matlab's files, define an alias in your bash profile:

alias antrax="LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6 antrax"
annahyan commented 3 years ago

Super, thanks for the tips!