Flair crashes in Geometry tab (macOs)

Versions

Please provide the used software versions.

FLUKA: 4-5.2
Flair: 3.4-5.4
Operating system: macOS 26.3.1
Python 3.13.14

Description

Please describe the issue. In case of reporting a bug, please provide step-by-step instructions for reproducing the error.

Dear Flair experts,

Flair crashes every time I switch to the geometry tab. I have tried following the steps from previous discussions, but still couldn’t solve the problem due to outdated systems or packages.

./flair: line 18: 40092 Segmentation fault: 11 ${PYTHON} -O -W ignore ${DIR}/flair.py "$@"

Everything else in Flair seems to work fine.

Please let me know if there is any way to resolve this issue. Thank you very much.

Best regards,
Heiley

Input files

Please upload all relevant files. (FLUKA input file, Flair project file, user routines, and data files)

Dear @HeileyWong,

Sorry for the late reply, I overlooked this thread.

As you suggested, the issue is related to some misconfiguration in the environment.
Unless you have not yet fixed the problem, I would suggest removing all ports with the command sudo port -fp uninstall installed and installing all the required packages following the instructions here.

If this does not solve the issue, please provide the output of these commands for troubleshooting:

pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
echo $PATH
gcc -v
port echo requested
port select --summary
port installed | grep -w tk

Best regards, Luigi

Dear @luillo ,

I reply to this thread since I am encountering a very similar error as the one of @HeileyWong .

/Users/Matteo/FLUKA/flair-3.4/flair: line 18: 15663 Bus error: 10           ${PYTHON} -O -W ignore ${DIR}/flair.py "$@"

This error appears “semi-randomly” and it’s 100% reproducible all the times but almost half of the times I’m clicking to the INPUT tab from the GEOMETRY one and viceversa.

Another weird thing that is happening to me is related to geo-viewer; instead of moving the camera around the model, it’s like I am dragging the viewports and the model around.

Anyway, I attached my outputs of the commands you requested.

pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
package-id: com.apple.pkg.CLTools_Executables
version: 26.6.0.0.1781586589
volume: /
location: /
install-time: 1782721014
echo $PATH
/Users/Matteo/BDSIM/bdsim-install/bin/../bin:/Users/Matteo/GEANT4/install/bin:/opt/local/bin:/opt/local/sbin:/Users/Matteo/Library/Python/3.13/bin:/opt/homebrew/opt/qt@5/bin:/opt/homebrew/Cellar/root/6.40.02/bin:/Users/Matteo/FLUKA/fluka4-5.2/bin:/opt/homebrew/sbin:/opt/homebrew/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/homebrew/Caskroom/miniforge/base/condabin:/Users/Matteo/BDSIM/bdsim-install/bin/../bin:/Users/Matteo/GEANT4/install/bin:/opt/local/bin:/opt/local/sbin:/Users/Matteo/Library/Python/3.13/bin:/opt/homebrew/opt/qt@5/bin:/Users/Matteo/FLUKA/fluka4-5.2/bin:/opt/homebrew/sbin:/opt/homebrew/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/pkg/env/global/bin:/Library/Apple/usr/bin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/share/dotnet:~/.dotnet/tools:/Applications/iTerm.app/Contents/Resources/utilities:/Users/Matteo/.local/bin:/Users/Matteo/GEANT4/install/bin:/Users/Matteo/BDSIM/bdsim-install/bin:/Users/Matteo/Scripts:/Users/Matteo/GEANT4/install/bin:/Users/Matteo/BDSIM/bdsim-install/bin:/Users/Matteo/Scripts
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/aarch64-apple-darwin25/14.3.0/lto-wrapper
Target: aarch64-apple-darwin25
Configured with: /opt/local/var/macports/build/gcc14-d0edef85/work/gcc-14.3.0/configure --prefix=/opt/local --build=aarch64-apple-darwin25 --enable-languages=c,c++,objc,obj-c++,lto,fortran,m2,jit --libdir=/opt/local/lib/gcc14 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-14 --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-14 --with-gxx-include-dir=/opt/local/include/gcc14/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-isl=/opt/local --with-zstd=/opt/local --enable-checking=release --disable-multilib --enable-lto --enable-libstdcxx-time --with-build-config=bootstrap-debug --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --enable-host-shared --with-darwin-extra-rpath=/opt/local/lib/libgcc --with-libiconv-prefix=/opt/local --disable-tls --with-gxx-libcxx-include-dir=/opt/local/libexec/gcc14/libc++/include/c++/v1 --with-pkgversion='MacPorts gcc14 14.3.0_0+stdlib_flag' --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.3.0 (MacPorts gcc14 14.3.0_0+stdlib_flag)
sudo port echo requested
gcc14                          @14.3.0_0+stdlib_flag
ghostscript                    @10.07.1_0+x11
gnuplot                        @6.0.4_0+aquaterm+luaterm+pangocairo+qt5+wxwidgets
pkgconfig                      @0.29.2_0
py313-pydicom                  @3.0.2_0
py313-scipy                    @1.18.0_1+accelerate+gfortran
py313-tkinter                  @3.13.14_1+quartz
tcl                            @8.6.18_0
tk                             @8.6.18_0+x11
xorg                           @20090316_0
xorg-server                    @1.20.11_1
xterm                          @406_0
 sudo port select --summary
Name       Selected   Options
====       ========   =======
clang      none       mp-clang-19 none
fonttools  none       fonttools-313 none
gcc        mp-gcc14   mp-gcc14 none
llvm       none       mp-llvm-19 mp-llvm-22 none
pip        pip313     none
pip3       pip313     none
python     python313  python313 python314 none
python3    python313  python313 python314 none
wxWidgets  none       wxWidgets-3.2 none
sudo port installed | grep -w tk
  tk @8.6.18_0+x11 (active)

Many thanks in advance for your help.

Cheers,

Matteo

Dear @mcapitan,

Your environment variable PATH includes both Homebrew and MacPorts paths. This is a source of potential conflicts between libraries provided by the package managers.
I’d recommend keeping the two package managers separated.
Please follow the instructions from this post.

Let me know if this works for you.
Best regards

Dear @luillo

Thank you for the fast reply!

I tried to follow your advice and I even completely uninstalled brew from my system (just for the compilation of geoviewer), but the same but I got the same bug…

As you can see my PATH variable does not have any reference to brew:

echo $PATH
/Users/Matteo/BDSIM/bdsim-install/bin/../bin:/Users/Matteo/GEANT4/install/bin:/Users/Matteo/Library/Python/3.13/bin:/Users/Matteo/FLUKA/fluka4-5.2/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/Users/Matteo/BDSIM/bdsim-install/bin/../bin:/Users/Matteo/GEANT4/install/bin:/Users/Matteo/Library/Python/3.13/bin:/Users/Matteo/FLUKA/fluka4-5.2/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/pkg/env/global/bin:/Library/Apple/usr/bin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/share/dotnet:~/.dotnet/tools:/opt/homebrew/bin:/Applications/iTerm.app/Contents/Resources/utilities:/Users/Matteo/.local/bin:/Users/Matteo/GEANT4/install/bin:/Users/Matteo/BDSIM/bdsim-install/bin:/Users/Matteo/Scripts:/Users/Matteo/GEANT4/install/bin:/Users/Matteo/BDSIM/bdsim-install/bin:/Users/Matteo/Scripts

Moreover, during the compilation process of geoviewer, make couldn’t find the tcl libraries and I had to force it via the following commands:

export PKG_CONFIG_PATH=/opt/local/lib/pkgconfig:/opt/local/lib/tcl8/pkgconfig

Maybe the two things are related?

I remain at your disposal for whatever test you need to perform.

Cheers,
Matteo

Dear @mcapitan,

I noticed there are other directories in your PATH variable. Perhaps the python3 executable isn’t the one from MacPorts. You can check this by running which python3. To test further, remove everything from the PATH variable before the MacPorts directories.

It’s strange that tcl isn’t found. They should be located with the utility pkg-config you installed.
Can you check where this executable is located with the command which pkg-config and what is the output of pkg-config --libs tk?

Best Luigi

Dear @luillo ,

I still got the same issue…

I tried to compile geoviewer in a new window with only the MacPorts (and the system core utilities) in the PATH as following

 echo $PATH
/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin

My python/python3 is the one installed via MacPorts, as well as the pkg-config utility:

which python3
/opt/local/bin/python3
which python
/opt/local/bin/python
which pkg-config
/opt/local/bin/pkg-config

However, the output of pkg-config --libs tk is empty before I run the export PKG_CONFIG_PATH=... command:

pkg-config --libs tk
Package tcl was not found in the pkg-config search path.
Perhaps you should add the directory containing `tcl.pc'
to the PKG_CONFIG_PATH environment variable
Package 'tcl', required by 'tk', not found 

while after the export, it gives:

-L/opt/local/lib/tk8-x11 -L/opt/local/lib/tcl8 -ltk8.6 -ltkstub8.6 -ltcl8.6 -ltclstub8.6

and the compilation will proceed as normal, but the resulting flair installation is very unstable and crashes often.

Cheers,
Matteo

Dear @mcapitan,

I have a setup similar to yours that works perfectly.

Before compiling the geoviewer, ensure you run a make clean command. If that doesn’t help, you might want to check your MacPorts installation using the following commands:

sudo port selfupdate
sudo port upgrade outdated
sudo port reclaim

Alternatively, you could remove all installed ports with sudo port -fp uninstall installed and then reinstall.

Please let me know what you find.

Cheers, Luigi