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:

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): line: 74

G4double charge = step->GetTrack()->GetDefinition()->GetPDGCharge(); lines: 90 - 96
  if ( ! hit ) {
    G4cerr << "Cannot access hit " << layerNumber << G4endl;

  // Add values

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 ]