Message: Segmentation Error After A Number Of Events Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Segmentation Error After A Number Of Events 

Forum: Event and Track Management
Date: 27 Nov, 2017
From: Odera Dim <Odera Dim>

I am using geant4 to model spontaneous fission using the G4fissionEvent method. The way I have it setup is that in PrimaryGeneratorAction I have instantiated G4fissionEvent header and call the method in my GeneratePrimaries function (i.e a function which takes a pointer from G4Event as argument). This means that at the beginning of an event, G4fissionEvent is called and it produces a number of neutrons (i.e which is the particle of interest to my work). The issue I seem to be having is a Segmentation Fault after the application has completed a number of events successfully. I used the gdb debugger to try to narrow down which specific function associated with the G4fissionEvent might be causing the segfault and it reveals the method G4SmpIsoDir seems to be where the segfault is originating.

As another way to confirm that my issue was really originating from G4SmpIsoDir I made a scale down copy (i.e removed all functions, methods or objects related to neutron generation) of the G4fissionEvent method and associated methods so that I can further troubleshoot the issue. I specifically commented out the function call to G4SmpIsoDir and ran my application. Although, apparently I did not get the result I was looking for, the application ran for 10 million events without a segmentation fault. I then un-commented the function call to G4SmpIsoDir and the went into the implementation file and commented out the de-referenced pointers where the value of the x-y-z component of the direction is stored. This also was segmentation fault free.

Based on what I have the only conclusion I am able to come to is that there is some issue with the G4SmpIsoDir.cc method but I can't say if it is related to how I use it or something else. Please can someone kindly share some ideas as to how to tackle this issue? Thank you.

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

1 None: Re: Segmentation Error After A Number Of Events   (Alexey Solovyev - 04 Dec, 2017)
 Add Message Add Message
to: "Segmentation Error After A Number Of Events"

 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 ]