"Event Must Be Aborted" during tracking seems to cause segfault

Geant4 Version: 10.07.p04
Operating System: macOS Tahoe
Compiler/Version: Apple Clang 17.0.0
CMake Version: 4.2.1


We’ve been running into this for a while, but trying to fix the underlying errors rather than this segfault. At several places in our simulation code, we do sanity checks and stop the event if something sufficiently unpleasant happens.

What I’ve noticed is that when we do this, we get a very nice additional dump of the particle step where the exception happened, and then there is a segfault and the job crashes. The traceback shows the segfault in the function the called G4Exception (i.e., usually in our simulation framework code), rather than wherever the real segfault was.

Is this something other people have seen? If so, any suggestions on where we should be looking to address it?

1 Like