Problem 501 - Segmentation Fault
Summary: Segmentation Fault
Status: RESOLVED INVALID
Alias: None
Product: Geant4
Classification: Unclassified
Component: geometry/solids (show other problems)
Version: 5.0
Hardware: PC Linux
: P2 critical
Assignee: Gabriele Cosmo
URL: http://hep.fi.infn.it/PAMELA/am/pamel...
Depends on:
Blocks:
 
Reported: 2003-06-25 04:54 CEST by galante
Modified: 2003-07-12 05:12 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 galante 2003-06-25 04:54:29 CEST
Hi,
I created my geometry (trackerDetectorConstruction), set my sensitive
detector(trackerSD) and i tried to run it with the codes of the example N02 of
novice. I obtained the following results:
->with only one detector: all right
->with one detector and one magnetic module: Segmentation Fault when i do
  idle> /run/beamOn 1
->with more then one detector : Segmentation Fault when i do
  idle> /run/beamOn 1
It seems that the problem is with more than one object, both detector or magnet.

So i constructed my PhysicsList and my PrimaryGeneratorAction and i obtained
Segmentation Fault when i run the executable.
Please help me!!
Thanks,
          Annamaria

P.S. I'm running RedHat 7.3 with gcc-2.96-112.7.2
Comment 1 Gabriele Cosmo 2003-07-02 09:56:59 CEST
By analysing the provided application with a simple debug session it turns out
that the problem is due by the following line in the user application in
trackerPrimaryGeneratorAction constructor:
    G4ParticleDefinition* particle =  particleTable->FindParticle("electron");
This will return a NULL pointer, since "electron" is not a valid selection.
It should be instead:
    G4ParticleDefinition* particle =  particleTable->FindParticle("e-");
Comment 2 galante 2003-07-12 05:12:59 CEST
Thanks very much!!