Message: Segmentation fault in B5 walkthrough Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Segmentation fault in B5 walkthrough 

Forum: Documentation and Examples
Date: 15 Mar, 2017
From: Michael Hubbard <Michael Hubbard>

Hello everyone,

I have been working through the walk-through of what is effectively B5 from this website:

https://groups.lal.in2p3.fr/ED-geant4/program/session-5-exercise/

I have come to a stage of implementing hits and sensitive detectors in the simulation and am met with a segmentation fault when running the solution code in 10.03.p01 . The problem doesn't occur in 10.02.p02 and I am unable to find a solution to the problem.

The segmentation fault appears to be related to the following lines. (If you comment them out/set values to zero the solution runs fine):

EDChamberSD.cc line: 74

G4double charge = step->GetTrack()->GetDefinition()->GetPDGCharge();

EDEmCalorimeterSD.cc lines: 90 - 96
  if ( ! hit ) {
    G4cerr << "Cannot access hit " << layerNumber << G4endl;
    exit(1);
  }         

  // Add values
  hit->AddEdep(edep);

Any help or advice would be very appreciated. Many thanks Michael

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

1 None: Re: Segmentation fault in B5 walkthrough   (Ivana Hrivnacova - 15 Mar, 2017)
(_ None: Re: Segmentation fault in B5 walkthrough   (Michael Hubbard - 16 Mar, 2017)
 Add Message Add Message
to: "Segmentation fault in B5 walkthrough"

 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 ]