Multiple sessions of Slicer are launched in a loop

Hi,

I built Slicer 4.13.0 in Ubuntu 20.04.3 LTS. It worked properly and I was able to use Slicer.

Then I built SlicerIGT following these steps:

$ git clone https://github.com/SlicerIGT/SlicerIGT.git
$ mkdir SlicerIGT-debug
$ cd SlicerIGT-debug
$ cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DSlicer_DIR:PATH=~/Slicer/Slicer-SuperBuild-Debug/Slicer-build ../SlicerIGT
$ make

When the process completed, I runned Slicer, and multiple sessions of Slicer had been launched in a loop. It happens every time I run Slicer now.

Do you know why it happens? Do you know how to solve it?

Thank you

It seems you store a shell script that starts Slicer in a folder listed among the “Additional module paths”. It leads to an infinite loop of Slicer launches because when Slicer starts, it attempts to run each executable (including shell scripts) that are in “Additional module paths” folders to get basic module information, and if any of those scripts launch Slicer then you start a new loop.

The solution is to only keep Slicer modules (.so, .py, .sh, …) in your module folders and move your helper scripts to a parent folder or subfolder.