ERROR: Interceptors are not working.

Discussions regarding ARGoS bugs. Report bugs here.
eptap
Posts: 9
Joined: Mon Sep 18, 2017 9:35 pm

ERROR: Interceptors are not working.

Postby eptap » Thu Sep 21, 2017 6:19 am

(I think this post is a little less trivial than my previous one)

Here is the error I get:

~/Documents/Argos$ argos3 -c experiments/diffusion_1.argos
[INFO] Loaded library "/usr/local/Cellar/argos3/3.0.0-beta47/lib/argos3/libargos3core_simulator.dylib"
[INFO] Loaded library "/usr/local/Cellar/argos3/3.0.0-beta47/lib/argos3/libargos3plugin_simulator_dynamics2d.dylib"
[INFO] Loaded library "/usr/local/Cellar/argos3/3.0.0-beta47/lib/argos3/libargos3plugin_simulator_entities.dylib"
[INFO] Loaded library "/usr/local/Cellar/argos3/3.0.0-beta47/lib/argos3/libargos3plugin_simulator_epuck.dylib"
[INFO] Loaded library "/usr/local/Cellar/argos3/3.0.0-beta47/lib/argos3/libargos3plugin_simulator_eyebot.dylib"
[INFO] Loaded library "/usr/local/Cellar/argos3/3.0.0-beta47/lib/argos3/libargos3plugin_simulator_footbot.dylib"
[INFO] Loaded library "/usr/local/Cellar/argos3/3.0.0-beta47/lib/argos3/libargos3plugin_simulator_genericrobot.dylib"
[INFO] Loaded library "/usr/local/Cellar/argos3/3.0.0-beta47/lib/argos3/libargos3plugin_simulator_media.dylib"
[INFO] Loaded library "/usr/local/Cellar/argos3/3.0.0-beta47/lib/argos3/libargos3plugin_simulator_pointmass3d.dylib"
[INFO] Loaded library "/usr/local/Cellar/argos3/3.0.0-beta47/lib/argos3/libargos3plugin_simulator_qtopengl.dylib"
[INFO] Loaded library "/usr/local/Cellar/argos3/3.0.0-beta47/lib/argos3/libargos3plugin_simulator_spiri.dylib"
==28427==ERROR: Interceptors are not working. This may be because AddressSanitizer is loaded too late (e.g. via dlopen). Please launch the executable with:
DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/8.1.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib
"interceptors not installed" && 0Abort trap: 6

So, I tried launching the executable by code injecting this library (at least the blog that I read said that is what I'm doing here):

DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/8.1.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib argos3 -c experiments/diffusion_1.argos

yet, I still get the exact same error. Any ideas?

pincy
Site Admin
Posts: 512
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: ERROR: Interceptors are not working.

Postby pincy » Thu Sep 21, 2017 1:48 pm

Which commands did you execute to compile the ARGoS examples?
I made ARGoS.

eptap
Posts: 9
Joined: Mon Sep 18, 2017 9:35 pm

Re: ERROR: Interceptors are not working.

Postby eptap » Fri Sep 22, 2017 4:35 pm

Initial commands:

511 brew tap ilpincy/argos3
512 brew install bash-completion qt lua argos3
514 git clone https://github.com/ilpincy/argos3-examples.git argos3-examples
516 cd argos3-examples/
(Note: I tried making a /build directory and compiling within here, but then I wouldn't be in the path to the other directories needed for the compilation. I then settled on changing the name of /argos3-examples --> /build)
523 cmake -DCMAKE_BUILD_TYPE=Debug
536 argos3 -c experiments/diffusion_1.argos

...This isn't the whole story though, and looking back now, I'm pretty sure I made a series of huge mistakes (to the point I'm face palming as I write this)...

So, after initially installing, I was confused by the proper file hierarchy and where exactly the /build directory should go. I concluded that I had made some mistake, so I decided to just start over....by "rm -r" rather than using the "sudo /usr/share/argos3/uninstall_argos.sh" script (I know...). After then trying to reinstall argos3 starting with the command:

511 brew tap ilpincy/argos3

It was then telling me that Argos3 needed to be linked, so I ran:

506 brew link --overwrite argos3>
(--overwrite since I hadn't actually properly uninstalled Argos, and also the 1st flag I had seriously goofed)

Ultimately, something wasn't properly writing in certain directories so...I removed them...
507 sudo rm -r /usr/local/share/argos3
509 sudo rm -r /usr/local/lib/argos3
...until the following commands worked:
510 brew link --overwrite argos3
511 brew tap ilpincy/argos3
(Note: same command as the one on top)

I'm pretty sure this was a series of very bad decisions because I can't seem to find the the /share directory holding the uninstall script, which I naively thought would just be re-built after I re-installed Argos. I didn't think that, because I hadn't deleted everything, it may be possible that what ever is installing Argos3 on my computer will see the other scripts and think that Argos3 is already installed (thereby never rebuilding the two directories that I deleted scorched earth style).

I'm not sure if this is precisely the issue in running the first demo experiment, but I also don't think that this grievous error should be ignored.

Also, I'll be sure to read the documentation more carefully in the future (no matter how pressed for time I am).

pincy
Site Admin
Posts: 512
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: ERROR: Interceptors are not working.

Postby pincy » Fri Sep 22, 2017 9:54 pm

The correct commands to install ARGoS for the first time are:

brew tap ilpincy/argos3
brew install bash-completion qt lua argos3

Then, upgrading is a matter of writing:

brew upgrade argos3

If you want to uninstall ARGoS, do:

brew uninstall argos3

If you messed up something and want to start over, do the following:

# This will uninstall ARGoS using HomeBrew
brew uninstall argos3
# This will uninstall ARGoS from the Brew cellar is anything went wrong with uninstalling
sudo rm -rf `brew --cellar argos3`
# This will uninstall ARGoS from /usr/local
sudo rm -rf /usr/local/bin/argos3
sudo rm -rf /usr/local/doc/argos3
sudo rm -rf /usr/local/include/argos3
sudo rm -rf /usr/local/lib/argos3
sudo rm -rf /usr/local/lib/pkgconfig/argos3_simulator.pc
sudo rm -rf /usr/local/libexec/argos3
sudo rm -rf /usr/local/share/man/man1/argos3.1.gz
sudo rm -rf /usr/local/share/argos3

Beware that ARGoS must not be installed twice. If you do, you'll have memory corruption problems. So uninstall everything with the above commands, and start over.

Regarding the error you found, I'll make a little modification to the ARGoS examples to make it optional on Mac so use the address sanitizer. If you compile the examples in Debug, the address sanitizer is installed but ARGoS does not use it and you get that error. It's an easy fix. Thanks for spotting it!
I made ARGoS.

pincy
Site Admin
Posts: 512
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: ERROR: Interceptors are not working.

Postby pincy » Fri Sep 22, 2017 10:14 pm

OK I made the modification to the ARGoS examples that fixes this problem.

Do this:

cd argos3-examples
git pull
rm -rf build && mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Debug ..
make

cd ..
argos3 -c experiments/diffusion_1.argos

Now you should be able to compile the examples in Debug without the error. Please note that compiling in Debug results in slow code.
I made ARGoS.

eptap
Posts: 9
Joined: Mon Sep 18, 2017 9:35 pm

Re: ERROR: Interceptors are not working.

Postby eptap » Sat Sep 23, 2017 1:17 am

Errors occurred after running cmake:

:~/Documents/Argos/argos3-examples/build$ cmake -DCMAKE_BUILD_TYPE=Debug
-- The C compiler identification is AppleClang 8.1.0.8020042
-- The CXX compiler identification is AppleClang 8.1.0.8020042
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2")
-- Checking for module 'argos3_simulator'
-- Found argos3_simulator, version 3.0.0-beta47
-- Found OpenGL: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/OpenGL.framework
-- Found GLUT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/GLUT.framework
CMake Warning at CMakeLists.txt:33 (find_package):
By not providing "FindGALIB.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "GALIB", but
CMake did not find one.

Could not find a package configuration file provided by "GALIB" with any of
the following names:

GALIBConfig.cmake
galib-config.cmake

Add the installation prefix of "GALIB" to CMAKE_PREFIX_PATH or set
"GALIB_DIR" to a directory containing one of the above files. If "GALIB"
provides a separate development package or SDK, be sure it has been
installed.


-- Found Lua52: /usr/local/lib/liblua.dylib
CMake Error at CMakeLists.txt:48 (add_subdirectory):
add_subdirectory given source "controllers" which is not an existing
directory.


CMake Error at CMakeLists.txt:51 (add_subdirectory):
add_subdirectory given source "loop_functions" which is not an existing
directory.


CMake Error at CMakeLists.txt:54 (add_subdirectory):
add_subdirectory given source "embedding" which is not an existing
directory.


-- Configuring incomplete, errors occurred!
See also "/Users/elliottapscott/Documents/Argos/argos3-examples/build/CMakeFiles/CMakeOutput.log".


I could only find a directory called "galib" (find command didn't turn up any configuration files or files with .cmake extension).

pincy
Site Admin
Posts: 512
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: ERROR: Interceptors are not working.

Postby pincy » Sat Sep 23, 2017 3:23 pm

You must have erased some files, because the file FindGALib.cmake is supposed to be in src/cmake (see here https://github.com/ilpincy/argos3-examp ... ster/cmake). I suggest you delete the entire argos3-examples/ directory and start over.
I made ARGoS.

eptap
Posts: 9
Joined: Mon Sep 18, 2017 9:35 pm

Re: ERROR: Interceptors are not working.

Postby eptap » Sat Sep 23, 2017 8:47 pm

Will I also have to delete the binaries?

eptap
Posts: 9
Joined: Mon Sep 18, 2017 9:35 pm

Re: ERROR: Interceptors are not working.

Postby eptap » Sun Sep 24, 2017 2:01 am

Got it working!

Here is what I had to do to get it working:

502 sudo rm -r argos3-examples/
506 git clone https://github.com/ilpincy/argos3-examples
509 cd argos3-examples/
518 cmake -DCMAKE_BUILD_TYPE=Debug
520 make
523 cd ..
524 mv argos3-examples/ build
527 mv ./build/experiments/ .
529 argos3 -c experiments/diffusion_1.argos

Lines 524 and 527 where key.

Thank you for the help!

pincy
Site Admin
Posts: 512
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: ERROR: Interceptors are not working.

Postby pincy » Sun Sep 24, 2017 2:06 pm

The commands you're mentioning are wrong. You forgot to create the build directory between

509 cd argos3-examples/
MISSING: mkdir build
MISSING: cd build
WRONG: 518 cmake -DCMAKE_BUILD_TYPE=Debug
SHOULD BE: cmake -DCMAKE_BUILD_TYPE=Debug ..

You should compile in argos3-examples/build/, and then run the examples from argos3-examples/.

I strongly suggest you to do what I suggested rather than what you did, because you'll have problems with other examples. Things are design to work as I told you.

Also, make sure to learn how CMake works. Part of the reason why I gave you those commands is to comply with what CMake does under the hood.
I made ARGoS.


Return to “Bugs”