Problem 79 - Segmentation fault in the function G4IonTable::GetIon(Z,A,J,Q)
Summary: Segmentation fault in the function G4IonTable::GetIon(Z,A,J,Q)
Status: RESOLVED WORKSFORME
Alias: None
Product: Geant4
Classification: Unclassified
Component: particles (show other problems)
Version: 0.1
Hardware: PC Linux
: P2 minor
Assignee: kurasige
URL:
Depends on:
Blocks:
 
Reported: 2000-04-03 17:18 CEST by mustapha
Modified: 2000-06-21 19:23 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description mustapha 2000-04-03 17:18:08 CEST
I'm trying to define an ion : Cs with Z=55, A=136, J=0. and Q=1. So I write in
myPhysicsList::ConstructParticle the following lines :

 // Ion : nuclear charge, mass, spin and atomic charge
 G4int Z = 55;
 G4int A = 136;
 G4int J = 0;
 G4int Q = 1;
 //  Define the ion using the member function FindIon(Z,A,J,Q) of the class
 // G4TableParticle
 G4ParticleDefinition*
 ion = G4ParticleTable::GetParticleTable->FindIon(Z,A,J,Q);

There was no problem during the compilation and the linking, but when I executed
my program I got the message : "Segmentation fault (core dumped)". And when I
used the debugger "gdb" I got the following message :
"Program received signal SIGSEGV, Segmentation fault.
0x8124ffa in G4IonTable::GetIon () at /usr/include/g++-2/stl_vector.h:150
150           insert_aux(end(), x);"

That is it
Comment 1 kurasige 2000-04-22 03:46:59 CEST
I can not reporduce the problem for geant4.0.1 on Linux. I also check the
geant4.1.0 but it works well.
The code for adding Cs ion looks good except for parenthesis is necessary just
after G4ParticleTable::GetParticleTable (This should be noticed by the compiler
but no problem was reported in compilation)