Problem 1339

Summary: G4EMDissociation segmentation fault
Product: Geant4 Reporter: Gong Ding <gdiso>
Component: processes/hadronic/models/em_dissociationAssignee: dennis.herbert.wright
Status: RESOLVED FIXED    
Severity: normal CC: asai
Priority: P5    
Version: 9.5   
Hardware: All   
OS: All   

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.