GEANT4 crash with logicDetector->SetSensitiveDetector

Thank a lot for you replay. This is the output of the simulation:

### Birks coefficients used in run time
Available UI session types: [ Qt, GAG, tcsh, csh ]
qt.qpa.xcb: X server does not support XInput 2
failed to get the current screen resources
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-lscavarda'
Visualization Manager instantiating with verbosity "warnings (3)"...
Visualization Manager initialising...
Registering graphics systems...

You have successfully registered the following graphics systems.
Registered graphics systems are:
  ASCIITree (ATree)
  DAWNFILE (DAWNFILE)
  G4HepRep (HepRepXML)
  G4HepRepFile (HepRepFile)
  RayTracer (RayTracer)
  VRML1FILE (VRML1FILE)
  VRML2FILE (VRML2FILE)
  gMocrenFile (gMocrenFile)
  OpenGLImmediateQt (OGLIQt, OGLI)
  OpenGLStoredQt (OGLSQt, OGL, OGLS)
  OpenGLImmediateX (OGLIX, OGLIQt_FALLBACK)
  OpenGLStoredX (OGLSX, OGLSQt_FALLBACK)
  RayTracerX (RayTracerX)

Registering model factories...

You have successfully registered the following model factories.
Registered model factories:
  generic
  drawByAttribute
  drawByCharge
  drawByOriginVolume
  drawByParticleID
  drawByEncounteredVolume

Registered models:
  None

Registered filter factories:
  attributeFilter
  chargeFilter
  originVolumeFilter
  particleFilter
  encounteredVolumeFilter

Registered filters:
  None

You have successfully registered the following user vis actions.
Run Duration User Vis Actions: none
End of Event User Vis Actions: none
End of Run User Vis Actions: none

Some /vis commands (optionally) take a string to specify colour.
"/vis/list" to see available colours.
/tracking/storeTrajectory 2
Attributes available for modeling and filtering with
  "/vis/modeling/trajectories/create/drawByAttribute" and
  "/vis/filtering/trajectories/create/attributeFilter" commands:
G4TrajectoriesModel:
  Event ID (EventID): G4int
  Run ID (RunID): G4int
G4SmoothTrajectory:
  Charge (Ch): unit: e+ (G4double)
  Track ID (ID): G4int
  Initial kinetic energy (IKE): G4BestUnit (G4double)
  Initial momentum magnitude (IMag): G4BestUnit (G4double)
  Initial momentum (IMom): G4BestUnit (G4ThreeVector)
  No. of points (NTP): G4int
  PDG Encoding (PDG): G4int
  Parent ID (PID): G4int
  Particle Name (PN): G4String
G4SmoothTrajectoryPoint:
  Auxiliary Point Position (Aux): G4BestUnit (G4ThreeVector)
  Step Position (Pos): G4BestUnit (G4ThreeVector)
WARNING: Trajectory storing has been requested.  This action may be
  reversed with "/tracking/storeTrajectory 0".
WARNING: The vis manager will keep up to 100 events.
  This may use a lot of memory.
  It may be changed with, e.g., "/vis/scene/endOfEventAction accumulate 10".
qt.qpa.xcb: QXcbConnection: XCB error: 1 (BadRequest), sequence: 164, resource id: 90, major code: 130 (Unknown), minor code: 47
qt.qpa.xcb: QXcbConnection: XCB error: 170 (Unknown), sequence: 177, resource id: 90, major code: 146 (Unknown), minor code: 20

phot:  for gamma SubType=12 BuildTable=0
      LambdaPrime table from 200 keV to 100 TeV in 61 bins
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
 LivermorePhElectric : Emin=    0 eV  Emax=  100 TeV  SauterGavrila Fluo

compt:  for gamma SubType=13 BuildTable=1
      Lambda table from 100 eV  to 1 MeV, 7 bins/decade, spline: 1
      LambdaPrime table from 1 MeV to 100 TeV in 56 bins
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
       Klein-Nishina : Emin=    0 eV  Emax=  100 TeV

conv:  for gamma SubType=14 BuildTable=1
      Lambda table from 1.022 MeV to 100 TeV, 18 bins/decade, spline: 1
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
     BetheHeitlerLPM : Emin=    0 eV  Emax=  100 TeV  ModifiedTsai

Rayl:  for gamma SubType=11 BuildTable=1
      Lambda table from 100 eV  to 100 keV, 7 bins/decade, spline: 0
      LambdaPrime table from 100 keV to 100 TeV in 63 bins
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
   LivermoreRayleigh : Emin=    0 eV  Emax=  100 TeV  CullenGenerator

msc:  for e-  SubType= 10
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
            UrbanMsc : Emin=    0 eV  Emax=  100 MeV Nbins=42 100 eV  - 100 MeV
              StepLim=UseSafety Rfact=0.04 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=1 Llimit=1
        WentzelVIUni : Emin=  100 MeV Emax=  100 TeV Nbins=42 100 MeV - 100 TeV
              StepLim=UseSafety Rfact=0.04 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=1 Llimit=1

eIoni:  for e-  SubType=2
      dE/dx and range tables from 100 eV  to 100 TeV in 84 bins
      Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
      StepFunction=(0.2, 1 mm), integ: 1, fluct: 1, linLossLim= 0.01
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
        MollerBhabha : Emin=    0 eV  Emax=  100 TeV

eBrem:  for e-  SubType=3
      dE/dx and range tables from 100 eV  to 100 TeV in 84 bins
      Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
      LPM flag: 1 for E > 1 GeV,  VertexHighEnergyTh(GeV)= 100000
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
             eBremSB : Emin=    0 eV  Emax=    1 GeV  ModifiedTsai
            eBremLPM : Emin=    1 GeV Emax=  100 TeV  ModifiedTsai

CoulombScat:  for e-, integral:1  SubType=1 BuildTable=1
      Lambda table from 100 MeV to 100 TeV, 7 bins/decade, spline: 1
      ThetaMin(p) < Theta(degree) < 180; pLimit(GeV^1)= 0.139531
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
  eCoulombScattering : Emin=  100 MeV Emax=  100 TeV

msc:  for e+  SubType= 10
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
            UrbanMsc : Emin=    0 eV  Emax=  100 MeV Nbins=42 100 eV  - 100 MeV
              StepLim=UseSafety Rfact=0.04 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=1 Llimit=1
        WentzelVIUni : Emin=  100 MeV Emax=  100 TeV Nbins=42 100 MeV - 100 TeV
              StepLim=UseSafety Rfact=0.04 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=1 Llimit=1

eIoni:  for e+  SubType=2
      dE/dx and range tables from 100 eV  to 100 TeV in 84 bins
      Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
      StepFunction=(0.2, 1 mm), integ: 1, fluct: 1, linLossLim= 0.01
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
        MollerBhabha : Emin=    0 eV  Emax=  100 TeV

eBrem:  for e+  SubType=3
      dE/dx and range tables from 100 eV  to 100 TeV in 84 bins
      Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
      LPM flag: 1 for E > 1 GeV,  VertexHighEnergyTh(GeV)= 100000
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
             eBremSB : Emin=    0 eV  Emax=    1 GeV  ModifiedTsai
            eBremLPM : Emin=    1 GeV Emax=  100 TeV  ModifiedTsai

annihil:  for e+, integral:1  SubType=5 BuildTable=0
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
            eplus2gg : Emin=    0 eV  Emax=  100 TeV

CoulombScat:  for e+, integral:1  SubType=1 BuildTable=1
      Lambda table from 100 MeV to 100 TeV, 7 bins/decade, spline: 1
      ThetaMin(p) < Theta(degree) < 180; pLimit(GeV^1)= 0.139531
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
  eCoulombScattering : Emin=  100 MeV Emax=  100 TeV

msc:  for proton  SubType= 10
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
        WentzelVIUni : Emin=    0 eV  Emax=  100 TeV Nbins=84 100 eV  - 100 TeV
              StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llimit=1

hIoni:  for proton  SubType=2
      dE/dx and range tables from 100 eV  to 100 TeV in 84 bins
      Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
      StepFunction=(0.2, 0.1 mm), integ: 1, fluct: 1, linLossLim= 0.01
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
               Bragg : Emin=    0 eV  Emax=    2 MeV
          BetheBloch : Emin=    2 MeV Emax=  100 TeV

hBrems:  for proton  SubType=3
      dE/dx and range tables from 100 eV  to 100 TeV in 84 bins
      Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
               hBrem : Emin=    0 eV  Emax=  100 TeV  ModifiedMephi

hPairProd:  for proton  SubType=4
      dE/dx and range tables from 100 eV  to 100 TeV in 84 bins
      Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
      Sampling table 17x1001; from 7.50618 GeV to 100 TeV
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
           hPairProd : Emin=    0 eV  Emax=  100 TeV  ModifiedMephi

CoulombScat:  for proton, integral:1  SubType=1 BuildTable=1
      Lambda table from threshold  to 100 TeV, 7 bins/decade, spline: 1
      ThetaMin(p) < Theta(degree) < 180; pLimit(GeV^1)= 0.139531
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
  eCoulombScattering : Emin=    0 eV  Emax=  100 TeV

msc:  for GenericIon  SubType= 10
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
            UrbanMsc : Emin=    0 eV  Emax=  100 TeV
              StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llimit=1

ionIoni:  for GenericIon  SubType=2
      dE/dx and range tables from 100 eV  to 100 TeV in 84 bins
      Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
      StepFunction=(0.2, 0.1 mm), integ: 1, fluct: 1, linLossLim= 0.02
      Stopping Power data for 17 ion/material pairs
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
            BraggIon : Emin=    0 eV  Emax=    2 MeV
          BetheBloch : Emin=    2 MeV Emax=  100 TeV

msc:  for alpha  SubType= 10
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
            UrbanMsc : Emin=    0 eV  Emax=  100 TeV Nbins=84 100 eV  - 100 TeV
              StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llimit=1

ionIoni:  for alpha  SubType=2
      dE/dx and range tables from 100 eV  to 100 TeV in 84 bins
      Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
      StepFunction=(0.2, 0.1 mm), integ: 1, fluct: 1, linLossLim= 0.02
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
            BraggIon : Emin=    0 eV  Emax=7.9452 MeV
          BetheBloch : Emin=7.9452 MeV Emax=  100 TeV

msc:  for anti_proton  SubType= 10
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
        WentzelVIUni : Emin=    0 eV  Emax=  100 TeV Nbins=84 100 eV  - 100 TeV
              StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llimit=1

hIoni:  for anti_proton  SubType=2
      dE/dx and range tables from 100 eV  to 100 TeV in 84 bins
      Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
      StepFunction=(0.2, 0.1 mm), integ: 1, fluct: 1, linLossLim= 0.01
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
            ICRU73QO : Emin=    0 eV  Emax=    2 MeV
          BetheBloch : Emin=    2 MeV Emax=  100 TeV

hBrems:  for anti_proton  SubType=3
      dE/dx and range tables from 100 eV  to 100 TeV in 84 bins
      Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
               hBrem : Emin=    0 eV  Emax=  100 TeV  ModifiedMephi

hPairProd:  for anti_proton  SubType=4
      dE/dx and range tables from 100 eV  to 100 TeV in 84 bins
      Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
      Sampling table 17x1001; from 7.50618 GeV to 100 TeV
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
           hPairProd : Emin=    0 eV  Emax=  100 TeV  ModifiedMephi

CoulombScat:  for anti_proton, integral:1  SubType=1 BuildTable=1
      Lambda table from threshold  to 100 TeV, 7 bins/decade, spline: 1
      ThetaMin(p) < Theta(degree) < 180; pLimit(GeV^1)= 0.139531
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
  eCoulombScattering : Emin=    0 eV  Emax=  100 TeV

msc:  for kaon+  SubType= 10
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
        WentzelVIUni : Emin=    0 eV  Emax=  100 TeV Nbins=84 100 eV  - 100 TeV
              StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llimit=1

hIoni:  for kaon+  SubType=2
      dE/dx and range tables from 100 eV  to 100 TeV in 84 bins
      Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
      StepFunction=(0.2, 0.1 mm), integ: 1, fluct: 1, linLossLim= 0.01
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
               Bragg : Emin=    0 eV  Emax=1.05231 MeV
          BetheBloch : Emin=1.05231 MeV Emax=  100 TeV

hBrems:  for kaon+  SubType=3
      dE/dx and range tables from 100 eV  to 100 TeV in 84 bins
      Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
               hBrem : Emin=    0 eV  Emax=  100 TeV  ModifiedMephi

hPairProd:  for kaon+  SubType=4
      dE/dx and range tables from 100 eV  to 100 TeV in 84 bins
      Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
      Sampling table 18x1001; from 3.94942 GeV to 100 TeV
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
           hPairProd : Emin=    0 eV  Emax=  100 TeV  ModifiedMephi

CoulombScat:  for kaon+, integral:1  SubType=1 BuildTable=1
      Lambda table from threshold  to 100 TeV, 7 bins/decade, spline: 1
      ThetaMin(p) < Theta(degree) < 180; pLimit(GeV^1)= 0.139531
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
  eCoulombScattering : Emin=    0 eV  Emax=  100 TeV

msc:  for kaon-  SubType= 10
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
        WentzelVIUni : Emin=    0 eV  Emax=  100 TeV Nbins=84 100 eV  - 100 TeV
              StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llimit=1

hIoni:  for kaon-  SubType=2
      dE/dx and range tables from 100 eV  to 100 TeV in 84 bins
      Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
      StepFunction=(0.2, 0.1 mm), integ: 1, fluct: 1, linLossLim= 0.01
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
            ICRU73QO : Emin=    0 eV  Emax=1.05231 MeV
          BetheBloch : Emin=1.05231 MeV Emax=  100 TeV

hBrems:  for kaon-  SubType=3
      dE/dx and range tables from 100 eV  to 100 TeV in 84 bins
      Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
               hBrem : Emin=    0 eV  Emax=  100 TeV  ModifiedMephi

hPairProd:  for kaon-  SubType=4
      dE/dx and range tables from 100 eV  to 100 TeV in 84 bins
      Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
      Sampling table 18x1001; from 3.94942 GeV to 100 TeV
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
           hPairProd : Emin=    0 eV  Emax=  100 TeV  ModifiedMephi

CoulombScat:  for kaon-, integral:1  SubType=1 BuildTable=1
      Used Lambda table of kaon+
      ThetaMin(p) < Theta(degree) < 180; pLimit(GeV^1)= 0.139531
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
  eCoulombScattering : Emin=    0 eV  Emax=  100 TeV

msc:  for mu+  SubType= 10
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
        WentzelVIUni : Emin=    0 eV  Emax=  100 TeV Nbins=84 100 eV  - 100 TeV
              StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llimit=1

muIoni:  for mu+  SubType=2
      dE/dx and range tables from 100 eV  to 100 TeV in 84 bins
      Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
      StepFunction=(0.2, 0.1 mm), integ: 1, fluct: 1, linLossLim= 0.01
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
               Bragg : Emin=    0 eV  Emax=  200 keV
          BetheBloch : Emin=  200 keV Emax=    1 GeV
        MuBetheBloch : Emin=    1 GeV Emax=  100 TeV

muBrems:  for mu+  SubType=3
      dE/dx and range tables from 100 eV  to 100 TeV in 84 bins
      Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
              MuBrem : Emin=    0 eV  Emax=  100 TeV  ModifiedMephi

muPairProd:  for mu+  SubType=4
      dE/dx and range tables from 100 eV  to 100 TeV in 84 bins
      Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
      Sampling table 21x1001; from 1 GeV to 100 TeV
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
          muPairProd : Emin=    0 eV  Emax=  100 TeV  ModifiedMephi

CoulombScat:  for mu+, integral:1  SubType=1 BuildTable=1
      Lambda table from threshold  to 100 TeV, 7 bins/decade, spline: 1
      ThetaMin(p) < Theta(degree) < 180; pLimit(GeV^1)= 0.139531
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
  eCoulombScattering : Emin=    0 eV  Emax=  100 TeV

msc:  for mu-  SubType= 10
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
        WentzelVIUni : Emin=    0 eV  Emax=  100 TeV Nbins=84 100 eV  - 100 TeV
              StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llimit=1

muIoni:  for mu-  SubType=2
      dE/dx and range tables from 100 eV  to 100 TeV in 84 bins
      Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
      StepFunction=(0.2, 0.1 mm), integ: 1, fluct: 1, linLossLim= 0.01
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
            ICRU73QO : Emin=    0 eV  Emax=  200 keV
          BetheBloch : Emin=  200 keV Emax=    1 GeV
        MuBetheBloch : Emin=    1 GeV Emax=  100 TeV

muBrems:  for mu-  SubType=3
      dE/dx and range tables from 100 eV  to 100 TeV in 84 bins
      Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
              MuBrem : Emin=    0 eV  Emax=  100 TeV  ModifiedMephi

muPairProd:  for mu-  SubType=4
      dE/dx and range tables from 100 eV  to 100 TeV in 84 bins
      Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
      Sampling table 21x1001; from 1 GeV to 100 TeV
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
          muPairProd : Emin=    0 eV  Emax=  100 TeV  ModifiedMephi

CoulombScat:  for mu-, integral:1  SubType=1 BuildTable=1
      Used Lambda table of mu+
      ThetaMin(p) < Theta(degree) < 180; pLimit(GeV^1)= 0.139531
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
  eCoulombScattering : Emin=    0 eV  Emax=  100 TeV

msc:  for pi+  SubType= 10
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
        WentzelVIUni : Emin=    0 eV  Emax=  100 TeV Nbins=84 100 eV  - 100 TeV
              StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llimit=1

hIoni:  for pi+  SubType=2
      dE/dx and range tables from 100 eV  to 100 TeV in 84 bins
      Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
      StepFunction=(0.2, 0.1 mm), integ: 1, fluct: 1, linLossLim= 0.01
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
               Bragg : Emin=    0 eV  Emax=297.505 keV
          BetheBloch : Emin=297.505 keV Emax=  100 TeV

hBrems:  for pi+  SubType=3
      dE/dx and range tables from 100 eV  to 100 TeV in 84 bins
      Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
               hBrem : Emin=    0 eV  Emax=  100 TeV  ModifiedMephi

hPairProd:  for pi+  SubType=4
      dE/dx and range tables from 100 eV  to 100 TeV in 84 bins
      Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
      Sampling table 20x1001; from 1.11656 GeV to 100 TeV
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
           hPairProd : Emin=    0 eV  Emax=  100 TeV  ModifiedMephi

CoulombScat:  for pi+, integral:1  SubType=1 BuildTable=1
      Lambda table from threshold  to 100 TeV, 7 bins/decade, spline: 1
      ThetaMin(p) < Theta(degree) < 180; pLimit(GeV^1)= 0.139531
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
  eCoulombScattering : Emin=    0 eV  Emax=  100 TeV

msc:  for pi-  SubType= 10
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
        WentzelVIUni : Emin=    0 eV  Emax=  100 TeV Nbins=84 100 eV  - 100 TeV
              StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llimit=1

hIoni:  for pi-  SubType=2
      dE/dx and range tables from 100 eV  to 100 TeV in 84 bins
      Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
      StepFunction=(0.2, 0.1 mm), integ: 1, fluct: 1, linLossLim= 0.01
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
            ICRU73QO : Emin=    0 eV  Emax=297.505 keV
          BetheBloch : Emin=297.505 keV Emax=  100 TeV

hBrems:  for pi-  SubType=3
      dE/dx and range tables from 100 eV  to 100 TeV in 84 bins
      Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
               hBrem : Emin=    0 eV  Emax=  100 TeV  ModifiedMephi

hPairProd:  for pi-  SubType=4
      dE/dx and range tables from 100 eV  to 100 TeV in 84 bins
      Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
      Sampling table 20x1001; from 1.11656 GeV to 100 TeV
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
           hPairProd : Emin=    0 eV  Emax=  100 TeV  ModifiedMephi

CoulombScat:  for pi-, integral:1  SubType=1 BuildTable=1
      Used Lambda table of pi+
      ThetaMin(p) < Theta(degree) < 180; pLimit(GeV^1)= 0.139531
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
  eCoulombScattering : Emin=    0 eV  Emax=  100 TeV
G4VisManager: Using G4TrajectoryDrawByCharge as fallback trajectory model.
See commands in /vis/modeling/trajectories/ for other options.
G4ParticleGun::geantino
 was defined in terms of KineticEnergy: 1GeV
 is now defined in terms Momentum: 100GeV/c
Segmentation fault (core dumped) 

Do you see something strange?

Anyway I agree with you about the null pointer. However, since commenting that line the code works, I guess that the problem should be either with *sensDet or logicDetector . But I’m not spotting out the bug. The very strange thing is that I tried to run the same file on a centOS 7 machine with a GEANT4 version of 10.05.p01 and it works. So, I’m thinking that there is something trickier…