Problem 702 - Segmentation fault in G4PrimaryVertex::~G4PrimaryVertex
Summary: Segmentation fault in G4PrimaryVertex::~G4PrimaryVertex
Status: RESOLVED INVALID
Alias: None
Product: Geant4
Classification: Unclassified
Component: event (show other problems)
Version: 6.2
Hardware: PC Linux
: P2 normal
Assignee: Makoto.Asai
URL:
Depends on:
Blocks:
 
Reported: 2004-12-06 01:25 CET by Vlasios Vasileiou
Modified: 2004-12-15 01:30 CET (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Vlasios Vasileiou 2004-12-06 01:25:49 CET
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
Comment 1 Vlasios Vasileiou 2004-12-14 07:17:59 CET
False alarm,

found the problem in user code
Comment 2 Vlasios Vasileiou 2004-12-14 07:19:59 CET
False alarm,

found problem in user code
Comment 3 asai 2004-12-15 01:30:59 CET
The user reported that a bug was found in the user's code.