In my sim, I issue many particleGun->GeneratePrimaryVertex(anEvent) commands per event. In one event I had to issue over 200.000 such commands at the same event. After the event is processed and the destructors are being called I receive segmentation fault from G4PrimaryVertex::~G4PrimaryVertex. I went to the source code of G4PrimaryVertex.cc and changed to the code to G4PrimaryVertex::~G4PrimaryVertex() { G4cout <<"1"; if(theParticle != 0) { G4cout <<"2"; delete theParticle; G4cout <<"3";} G4cout <<"4"; if(nextVertex != 0) { G4cout <<"5"; delete nextVertex;G4cout <<"6"; } G4cout <<"7"; if(userInfo != 0) {G4cout <<"8"; delete userInfo; G4cout <<"9";} G4cout <<"10"<<G4endl; } For a good event I get Event #29697 Particle ID:1 Total Energy: 304.48624 GeV PMTs HIT: 0 PEs:0 12345123451234512345123451234512345123451234710 6710 6710 6710 6710 6710 6710 6710 6710 For the big event that gives me the segmentation fault I get only a long series of 12345. Then it crashes. I hope the extra info will help. Vlasios Vasileiou
False alarm, found the problem in user code
False alarm, found problem in user code
The user reported that a bug was found in the user's code.