Problem 1339 - G4EMDissociation segmentation fault
Summary: G4EMDissociation segmentation fault
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes/hadronic/models/em_dissociation (show other problems)
Version: 9.5
Hardware: All All
: P5 normal
Assignee: dennis.herbert.wright
URL:
Depends on:
Blocks:
 
Reported: 2012-07-21 14:11 CEST by Gong Ding
Modified: 2012-10-05 01:22 CEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Gong Ding 2012-07-21 14:11:40 CEST
A physics list including G4EMDissociation will get a segmentation fault when exit.

The destructor of G4EMDissociation delete the cross section object.
However, the base class G4VCrossSectionDataSet delete the cross section object again.  

G4EMDissociation::~G4EMDissociation ()
{
  if (handlerDefinedInternally) delete theExcitationHandler;
  delete dissociationCrossSection;   <-- this line
  delete thePhotonSpectrum;
}

G4VCrossSectionDataSet::~G4VCrossSectionDataSet()
{
  G4CrossSectionDataSetRegistry::Instance()->DeRegister(this); <-- delete again
}
Comment 1 dennis.herbert.wright 2012-10-05 01:22:47 CEST
Thanks for this report.  Your fix has been implemented and will appear in Geant4 9.6 this December.