Message: Segmentation fault with Geant4 10.1 Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Segmentation fault with Geant4 10.1 

Forum: Geometry
Date: 06 Mar, 2015
From: Marco Pinto <Marco Pinto>


if I use Geant4 version 10.1 with my programs using voxelized targets I have a segmentation fault every time I call the following lines in the SteppingAction:

const G4VTouchable* touchable = aStep->GetPreStepPoint()->GetTouchable();
G4int k = touchable->GetReplicaNumber(0);
G4int i = touchable->GetReplicaNumber(2);
G4int j = touchable->GetReplicaNumber(1);

In order to check if the problem was with my code, I copied these lines to the SteppingAction of the Hadrontherapy example and I have also created a SteppingAction in the DICOM example. In both tests I received a segmentation fault, apparently originating from:

G4TouchableHistory::GetReplicaNumber(int) const () from .../geant4/geant4.10.01-install/lib/

Interesting enough is the fact that when using these lines in a G4VSensitiveDetector class (e.g. HadrontherapyDetectorSD class in the hadrontherapy example) there is no segmentation fault.


Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Segmentation fault with Geant4 10.1   (Makoto Asai - 06 Mar, 2015)
1 None: Re: Segmentation fault with Geant4 10.1   (Marco Pinto - 06 Mar, 2015)
2 Ok: Re: Segmentation fault with Geant4 10.1   (Marco Pinto - 06 Mar, 2015)
 Add Message Add Message
to: "Segmentation fault with Geant4 10.1"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]