Message: Segmentation fault when using materials other than {G4_AIR, G4_WATER} Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Segmentation fault when using materials other than {G4_AIR, G4_WATER} 

Forum: Documentation and Examples
Date: 01 Feb, 2017
From: Stathis K <Stathis K>

Hi everyone,

when running a (heavily) modified version of exampleB1 that uses different materials (G4_LUNG_ICRP, G4_BRAIN_ICRP, etc.) for a parameterised volume, I get a segmentation fault. The stack trace is the following:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff1f49e9f in G4VEmProcess::DefineMaterial (couple=0x0, this=0xcada10) at /home/stathis/Downloads/geant4orig/geant4.10.02.p02/source/processes/electromagnetic/utils/include/G4VEmProcess.hh:446
446	    currentCouple   = couple;
(gdb) bt
#0  0x00007ffff1f49e9f in G4VEmProcess::DefineMaterial (couple=0x0, this=0xcada10) at /home/stathis/Downloads/geant4orig/geant4.10.02.p02/source/processes/electromagnetic/utils/include/G4VEmProcess.hh:446
#1  G4VEmProcess::PostStepGetPhysicalInteractionLength (this=0xcada10, track=..., previousStepSize=5, condition=0x824188)
    at /home/stathis/Downloads/geant4orig/geant4.10.02.p02/source/processes/electromagnetic/utils/src/G4VEmProcess.cc:624
(...snip...)

Apparently G4VEmProcess::DefineMaterial() is called with a null pointer for G4MaterialCutsCouple, but I'm not sure how I could fix this. I'm building all materials inside my detector's construction prior to running a beam on. I'm using the QGSP_BIC list.

Also, I've noticed that materials that are listed in the "table of registered couples" can be used without problem, but how could I add all the materials I need in this table? I'm referring to:

========= Table of registered couples ==============================

Index : 0     used in the geometry : Yes
 Material : G4_AIR
 Range cuts        :  gamma  700 um     e-  700 um     e+  700 um  proton 700 um 
 Energy thresholds :  gamma  990 eV     e-  990 eV     e+  990 eV  proton 70 keV
 Region(s) which use this couple : 
    DefaultRegionForTheWorld

Index : 1     used in the geometry : Yes
 Material : G4_WATER
 Range cuts        :  gamma  700 um     e-  700 um     e+  700 um  proton 700 um 
 Energy thresholds :  gamma  2.51944 keV    e-  276.265 keV    e+  270.751 keV proton 70 keV
 Region(s) which use this couple : 
    DefaultRegionForTheWorld

====================================================================

Sorry if this is a lame question. I'd appreciate any pointers!

Best regards, Stathis

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Segmentation fault when using materials other than {G4_AIR, G4_WATER}   (Makoto Asai - 01 Feb, 2017)
1 None: Re: Segmentation fault when using materials other than {G4_AIR, G4_WATER}   (Stathis K - 01 Feb, 2017)
2 None: Re: Segmentation fault when using materials other than {G4_AIR, G4_WATER}   (Stathis K - 01 Feb, 2017)
1 None: Re: Segmentation fault when using materials other than {G4_AIR, G4_WATER}   (Makoto Asai - 01 Feb, 2017)
 Add Message Add Message
to: "Segmentation fault when using materials other than {G4_AIR, G4_WATER}"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]