|Message: Re: Segmentation violation in G4BertiniElectroNuclearBuilder destructor||Not Logged In (login)|
Click on the Forum title, e.g. on the "Forums by Category" page, to read a sequence of postings to the Forum and its threads all in one page. If you are only interested in one thread or the thread following a specific posting, click the thread or the posting, which takes you to a smaller page, which contains only the part you are interested in and may be easier to navigate.
Messages are "chained" if there are only replies at the first level, i.e. 1/1.html, 1/1/1.html etc. In case of "chained" messages the message number is replaced by the icon and there is no indentation.
Inline: Display the subject line only or also the text of the posting(s); for the choice "All" the "Outline" choices are switched off.
|1||0||1||no text / full text of posting|
|2||1||All||text for level 1 only / text for All postings|
Outline: Choose the depth of the posting thread, successive toggle controls provide increasing detail.
|1||2||1||2 levels / 1 level (original posting)|
|2||3||2||3 levels / 2 levels|
|3||3||All||3 levels / all levels (all postings)|
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/libc.so.6 > #1 0x0000003b4204605e in ?? () from /lib/x86_64-linux-gnu/libc.so.6 > #2 0x00007f2b0303ecd7 in TUnixSystem::StackTrace() () from /opt/hep/lib/root/libCore.so.5.34 > #3 0x00007f2b03041e93 in TUnixSystem::DispatchSignals(ESignals) () from /opt/hep/lib/root/libCore.so.5.34 > #4 <signal handler called> > #5 0x0000000000000071 in ?? () > #6 0x00007f2afc614538 in G4BertiniElectroNuclearBuilder::~G4BertiniElectroNuclearBuilder() () from /opt/hep/lib/libG4physicslists.so > #7 0x00007f2afc6145b9 in G4BertiniElectroNuclearBuilder::~G4BertiniElectroNuclearBuilder() () from /opt/hep/lib/libG4physicslists.so > #8 0x00007f2afc61b543 in G4EmExtraPhysics::~G4EmExtraPhysics() () from /opt/hep/lib/libG4physicslists.so > #9 0x00007f2afc61b599 in G4EmExtraPhysics::~G4EmExtraPhysics() () from /opt/hep/lib/libG4physicslists.so > #10 0x00007f2afbf0891e in G4VModularPhysicsList::~G4VModularPhysicsList() () from /opt/hep/lib/libG4run.so > #11 0x00007f2afc677697 in TFTFP_BERT<G4VModularPhysicsList>::~TFTFP_BERT() () from /opt/hep/lib/libG4physicslists.so > #12 0x00007f2afc6776e9 in TFTFP_BERT<G4VModularPhysicsList>::~TFTFP_BERT() () from /opt/hep/lib/libG4physicslists.so > #13 0x00007f2afbef8af6 in G4RunManager::~G4RunManager() () from /opt/hep/lib/libG4run.so > > 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