Crash of Qt on macOS 10.15 with example B1


I’m new in Geant4. I installed the last version of Geant4 on my laptop that runs on macOS 10.15.

Everything works fine except when I run exampleB1. Indeed, when the interactive graphic interface is open I can interact with the geometry (rotate, zoom, etc …) but if I use the command /run/beamOn [numberofparticles] the application crashes.

The terminal output that I have is “zsh: illegal hardware instruction ./exampleB1”.

The error report is:
Process: exampleB1 [19409]
Path: /Users/USER/*/exampleB1
Identifier: exampleB1
Version: 0
Code Type: X86-64 (Native)
Parent Process: zsh [15336]
Responsible: Terminal [326]
User ID: 501

System Integrity Protection: enabled

Crashed Thread: 9

Exception Codes: 0x0000000000000001, 0x0000000000000000

Termination Signal: Illegal instruction: 4
Termination Reason: Namespace SIGNAL, Code 0x4
Terminating Process: exc handler [19409]

Application Specific Information:
-[NSOpenGLContext setView:] must be called from the main thread.

Do you have an idea of what I should do?

Thank you in advance.


Hello Gabriele. Could you write how you installed Geant4 on mac? Im new in Geant4 too, but i cant understand how to install/ Maybe you have some guide?

Thank you in advance.

Hi Gabriele,
I also encountered this issue, but I was able to solve. Seems that the problem is connected to which Qt installation is linked during the Geant4 compilation (in my case was the one provided by Conda).
Installing qt via homebrew:
brew install qt5
and linking using these parameters during Geant4 configure:
-DGEANT4_USE_QT=ON -DCMAKE_PREFIX_PATH=/usr/local/opt/qt/lib/cmake
resulted in a working exampleB1.