Message: Re: Segmentation violation in G4BertiniElectroNuclearBuilder destructor Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Segmentation violation in G4BertiniElectroNuclearBuilder destructor 

Forum: Physics List
Re: None Segmentation violation in G4BertiniElectroNuclearBuilder destructor (Marek Szuba)
Date: 29 Aug, 2013
From: Michael H. Kelsey <Michael H. Kelsey>

On Thu, 29 Aug 2013 13:34:53 GMT, Marek Szuba wrote:
> Every time my Geant4 application shuts down, I see a segmentation fault triggered by the destructor of G4BertiniElectroNuclearBuilder. The relevant portion of the stack trace looks along the lines of:
> #0  0x0000003b420c094a in waitpid () from /lib/x86_64-linux-gnu/
> #1  0x0000003b4204605e in ?? () from /lib/x86_64-linux-gnu/
> #2  0x00007f2b0303ecd7 in TUnixSystem::StackTrace() () from /opt/hep/lib/root/
> #3  0x00007f2b03041e93 in TUnixSystem::DispatchSignals(ESignals) () from /opt/hep/lib/root/
> #4  <signal handler called>
> #5  0x0000000000000071 in ?? ()
> #6  0x00007f2afc614538 in G4BertiniElectroNuclearBuilder::~G4BertiniElectroNuclearBuilder() () from /opt/hep/lib/
> #7  0x00007f2afc6145b9 in G4BertiniElectroNuclearBuilder::~G4BertiniElectroNuclearBuilder() () from /opt/hep/lib/
> #8  0x00007f2afc61b543 in G4EmExtraPhysics::~G4EmExtraPhysics() () from /opt/hep/lib/
> #9  0x00007f2afc61b599 in G4EmExtraPhysics::~G4EmExtraPhysics() () from /opt/hep/lib/
> #10 0x00007f2afbf0891e in G4VModularPhysicsList::~G4VModularPhysicsList() () from /opt/hep/lib/
> #11 0x00007f2afc677697 in TFTFP_BERT<G4VModularPhysicsList>::~TFTFP_BERT() () from /opt/hep/lib/
> #12 0x00007f2afc6776e9 in TFTFP_BERT<G4VModularPhysicsList>::~TFTFP_BERT() () from /opt/hep/lib/
> #13 0x00007f2afbef8af6 in G4RunManager::~G4RunManager() () from /opt/hep/lib/
> This happens for all three reference physics lists I use: FTFP_BERT, FTF_BIC and QBBC.

That's reasonable; if there's a problem in the dtor, it'll show up independently of which physics list used the builder.

In this case, I suspect there is a double-delete happening: one of the process or model pointers in the builder already got deleted somewhere else in the end-of-job code.

[...] > Any idea what the problem might be? I presently run version 9.6.2 but have also encountered the problem with 9.6.0 and, IIRC, 9.5.0.

Which Linux OS are you using, and which GCC version? I wasn't able to reproduce this myself (MacOSX with GCC 4.0.1).

Is there a chance you could rebuild your G4 installation with debugging (cmake -DCMAKE_BUILD_TYPE=Debug ...)? That would provide more details in the traceback, to see exactly which of the pointers is at fault.

-- Michael Kelsey

 Add Message Add Message
to: "Re: Segmentation violation in G4BertiniElectroNuclearBuilder destructor"

 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 ]