Skip to content

Segfaults - currently for information only.

Created by: padsley

This issue has been created for my own benefit so I have a place to store my thoughts. As you were.

I am currently getting a segmentation violation sometimes.

If I run a calculation with the same inputs, sometimes when I do /run/beamOn N, it crashes.

The culprit is Target::SlowDownBeam, which, when the fault occurs, is doing its first call using G4ParticleDefinition* (this is line 252 in Target.cc where if(Beam->GetParticleName()=="neutron" appears.

The failure always comes at the first event which makes me think that something is going wrong in the initialisation.

If I comment out that line (252), then the code fails further down. Yay.

The failure is not consistent - i.e. it doesn't always happen. If I re-run with the same input, things are working fine.