Illegal instruction (core dumped)

Hi,
I am setting up a simple Cherekov detector setup. The project is kept here (main code name sim.cc):

When I run on Ubuntu 24.04, the code is compiling.
Then during the run, the QT dialogue box appears with the detector setup.
But as soon as I hit the green play button on the dialogue box,
I see the error:

Illegal instruction (core dumped)

I am puzzled because the same project is compiling and running fine on my MacOS.
Only difference between the two setups is that on Ubuntu, I installed Geant4 with both the QT and X11 flag on, and on MacOS it is done only with the QT.

EDIT: Even after turning off the X11 flag during Geant4 installation on Ubuntu, I am getting the same Illegal instruction (core dumped) error.

Here are more details:

  1. cmake flags for installing the Geant4 on Ubuntu:
cmake -DCMAKE_INSTALL_PREFIX=/home/nplab/Geant4_Install -DGEANT4_INSTALL_DATA=ON -DGEANT4_BUILD_MULTITHREADED=ON -DGEANT4_USE_OPENGL_X11=ON -DGEANT4_USE_RAYTRACER_X11=ON -DGEANT4_USE_PYTHON=ON -DGEANT4_USE_QT=ON -DGEANT4_INSTALL_EXAMPLES=ON  -DGEANT4_USE_SYSTEM_ZLIB=ON -DGEANT4_BUILD_TLS_MODEL=global-dynamic -DGEANT4_USE_GDML=ON -DCMAKE_CXX_STANDARD=20 /home/nplab/geant4_software/geant4

(I have turned on both the QT5 and X11
Edit: In the latest installation, X11 and RAYTRACER_X11 are turned off. Though the same error is being shown.)

  1. cmake configuration of the ProjectGeant4:
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found EXPAT: /usr/lib/x86_64-linux-gnu/libexpat.so (found suitable version "2.6.1", minimum required is "2.6.1") 
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found suitable version "1.3", minimum required is "1.3")  
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Found XercesC: /usr/lib/x86_64-linux-gnu/libxerces-c.so (found suitable version "3.2.4", minimum required is "3.2.4") 
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so   
-- Found Geant4: /home/nplab/Geant4_Install/lib/cmake/Geant4/Geant4Config.cmake (found version "11.2.2") 
-- Configuring done (0.4s)
-- Generating done (0.0s)
-- Build files have been written to: /home/nplab/MScLab/ProjectGeant4/build
  1. building the project ProjectGeant4:
[ 37%] Building CXX object CMakeFiles/sim.dir/action.cc.o
[ 50%] Building CXX object CMakeFiles/sim.dir/sim.cc.o
[ 50%] Building CXX object CMakeFiles/sim.dir/construction.cc.o
[ 50%] Building CXX object CMakeFiles/sim.dir/detector.cc.o
[ 62%] Building CXX object CMakeFiles/sim.dir/generator.cc.o
[ 75%] Building CXX object CMakeFiles/sim.dir/physics.cc.o
[ 87%] Building CXX object CMakeFiles/sim.dir/run.cc.o
/home/nplab/MScLab/ProjectGeant4/detector.cc: In member function ‘virtual G4bool MySensitiveDetector::ProcessHits(G4Step*, G4TouchableHistory*)’:
/home/nplab/MScLab/ProjectGeant4/detector.cc:43:1: warning: no return statement in function returning non-void [-Wreturn-type]
   43 | }
      | ^
[100%] Linking CXX executable sim
[100%] Built target sim

  1. running the project and crash:
> ./sim

**************************************************************
 Geant4 version Name: geant4-11-02-patch-02 [MT]   (21-June-2024)
                       Copyright : Geant4 Collaboration
                      References : NIM A 506 (2003), 250-303
                                 : IEEE-TNS 53 (2006), 270-278
                                 : NIM A 835 (2016), 186-225
                             WWW : http://geant4.org/
**************************************************************
.
.
.
Checking overlaps for volume physDetector:9997 (G4Box) ... OK! 
Checking overlaps for volume physDetector:9998 (G4Box) ... OK! 
Checking overlaps for volume physDetector:9999 (G4Box) ... OK! 
### Birks coefficients used in run time
Available UI session types: [ Qt, tcsh, csh ]
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)
  G4HepRepFile (HepRepFile)
  RayTracer (RayTracer)
  VRML2FILE (VRML2FILE)
  gMocrenFile (gMocrenFile)
  TOOLSSG_OFFSCREEN (TSG_OFFSCREEN)
  TOOLSSG_OFFSCREEN (TSG_OFFSCREEN, TSG_FILE)
  OpenGLImmediateQt (OGLIQt, OGLI)
  OpenGLStoredQt (OGLSQt, OGL, OGLS)
  TOOLSSG_QT_GLES (TSG_QT_GLES, TSGQt, TSG)
  TOOLSSG_QT_ZB (TSG_QT_ZB, TSGQtZB)
Default graphics system is: OGL (based on build flags).
Default window size hint is: 600x600-0+0 (based on G4VisManager initialisation).
Note: Parameters specified on the command line will override these defaults.
      Use "vis/open" without parameters to get these defaults.

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.
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".
 Changing export format to "jpg"
=======================================================================
======                 Electromagnetic Physics Parameters      ========
=======================================================================
LPM effect enabled                                 1
Enable creation and use of sampling tables         0
Apply cuts on all EM processes                     0
Use combined TransportationWithMsc                 Disabled
Use general process                                1
Enable linear polarisation for gamma               0
Enable photoeffect sampling below K-shell          1
Enable sampling of quantum entanglement            0
X-section factor for integral approach             0.8
Min kinetic energy for tables                      100 eV 
Max kinetic energy for tables                      100 TeV
Number of bins per decade of a table               7
Verbose level                                      1
Verbose level for worker thread                    0
Bremsstrahlung energy threshold above which 
  primary e+- is added to the list of secondary    100 TeV
Bremsstrahlung energy threshold above which primary
  muon/hadron is added to the list of secondary    100 TeV
Lowest triplet kinetic energy                      1 MeV
Enable sampling of gamma linear polarisation       0
5D gamma conversion model type                     0
5D gamma conversion model on isolated ion          0
Livermore data directory                           epics_2017
=======================================================================
======                 Ionisation Parameters                   ========
=======================================================================
Step function for e+-                              (0.2, 1 mm)
Step function for muons/hadrons                    (0.2, 0.1 mm)
Step function for light ions                       (0.2, 0.1 mm)
Step function for general ions                     (0.2, 0.1 mm)
Lowest e+e- kinetic energy                         1 keV
Lowest muon/hadron kinetic energy                  1 keV
Use ICRU90 data                                    0
Fluctuations of dE/dx are enabled                  1
Type of fluctuation model for leptons and hadrons  Urban
Use built-in Birks satuaration                     1
Build CSDA range enabled                           0
Use cut as a final range enabled                   0
Enable angular generator interface                 0
Max kinetic energy for CSDA tables                 1 GeV
Max kinetic energy for NIEL computation            0 eV 
Linear loss limit                                  0.01
Read data from file for e+e- pair production by mu 0
=======================================================================
======                 Multiple Scattering Parameters          ========
=======================================================================
Type of msc step limit algorithm for e+-           1
Type of msc step limit algorithm for muons/hadrons 0
Msc lateral displacement for e+- enabled           1
Msc lateral displacement for muons and hadrons     0
Urban msc model lateral displacement alg96         1
Range factor for msc step limit for e+-            0.04
Range factor for msc step limit for muons/hadrons  0.2
Geometry factor for msc step limitation of e+-     2.5
Safety factor for msc step limit for e+-           0.6
Skin parameter for msc step limitation of e+-      1
Lambda limit for msc step limit for e+-            1 mm
Use Mott correction for e- scattering              0
Factor used for dynamic computation of angular 
  limit between single and multiple scattering     1
Fixed angular limit between single 
  and multiple scattering                          3.1416 rad
Upper energy limit for e+- multiple scattering     100 MeV
Type of electron single scattering model           0
Type of nuclear form-factor                        1
Screening factor                                   1
=======================================================================

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 150 keV, 7 bins/decade, spline: 0
      LambdaPrime table from 150 keV to 100 TeV in 62 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 Llim=1 mm
        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 Llim=1 mm

eIoni:  for e-  XStype:3  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: 3, fluct: 1, linLossLim= 0.01
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
        MollerBhabha : Emin=    0 eV  Emax=  100 TeV

eBrem:  for e-  XStype:4  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- XStype:1 SubType=1 BuildTable=1
      Lambda table from 100 MeV to 100 TeV, 7 bins/decade, spline: 0
      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 Llim=1 mm
        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 Llim=1 mm

eIoni:  for e+  XStype:3  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: 3, fluct: 1, linLossLim= 0.01
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
        MollerBhabha : Emin=    0 eV  Emax=  100 TeV

eBrem:  for e+  XStype:4  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+ XStype:2 SubType=5 BuildTable=0
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
            eplus2gg : Emin=    0 eV  Emax=  100 TeV

CoulombScat:  for e+ XStype:1 SubType=1 BuildTable=1
      Lambda table from 100 MeV to 100 TeV, 7 bins/decade, spline: 0
      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 Llim=1 mm

hIoni:  for proton  XStype:3  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: 3, 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  XStype:1  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  XStype:1  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 XStype:1 SubType=1 BuildTable=1
      Lambda table from threshold  to 100 TeV, 7 bins/decade, spline: 0
      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 Llim=1 mm

ionIoni:  for GenericIon  XStype:3  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: 3, fluct: 1, linLossLim= 0.02
      ===== 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
          StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llim=1 mm

ionIoni:  for alpha  XStype:3  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: 3, 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 Llim=1 mm

hIoni:  for anti_proton  XStype:3  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: 3, 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  XStype:1  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  XStype:1  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 XStype:1 SubType=1 BuildTable=1
      Lambda table from threshold  to 100 TeV, 7 bins/decade, spline: 0
      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 Llim=1 mm

hIoni:  for kaon+  XStype:3  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: 3, 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+  XStype:1  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+  XStype:1  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+ XStype:1 SubType=1 BuildTable=1
      Lambda table from threshold  to 100 TeV, 7 bins/decade, spline: 0
      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 Llim=1 mm

hIoni:  for kaon-  XStype:3  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: 3, 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-  XStype:1  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-  XStype:1  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- XStype: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 Llim=1 mm

muIoni:  for mu+  XStype:3  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: 3, fluct: 1, linLossLim= 0.01
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
               Bragg : Emin=    0 eV  Emax=  200 keV
        MuBetheBloch : Emin=  200 keV Emax=  100 TeV

muBrems:  for mu+  XStype:1  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+  XStype:1  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 0.85 GeV to 100 TeV 
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
          muPairProd : Emin=    0 eV  Emax=  100 TeV  ModifiedMephi

CoulombScat:  for mu+ XStype:1 SubType=1 BuildTable=1
      Lambda table from threshold  to 100 TeV, 7 bins/decade, spline: 0
      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 Llim=1 mm

muIoni:  for mu-  XStype:3  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: 3, fluct: 1, linLossLim= 0.01
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
            ICRU73QO : Emin=    0 eV  Emax=  200 keV
        MuBetheBloch : Emin=  200 keV Emax=  100 TeV

muBrems:  for mu-  XStype:1  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-  XStype:1  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 0.85 GeV to 100 TeV 
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
          muPairProd : Emin=    0 eV  Emax=  100 TeV  ModifiedMephi

CoulombScat:  for mu- XStype: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 Llim=1 mm

hIoni:  for pi+  XStype:3  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: 3, 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+  XStype:1  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+  XStype:1  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+ XStype:1 SubType=1 BuildTable=1
      Lambda table from threshold  to 100 TeV, 7 bins/decade, spline: 0
      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 Llim=1 mm

hIoni:  for pi-  XStype:3  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: 3, 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-  XStype:1  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-  XStype:1  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- XStype: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.
Copy number: 3852
Detector position: (-115,25,490)
Illegal instruction (core dumped)

Please help me out here.

Thank you very much,
Arka

_Geant4 Version: 11.2.1
_Operating System: Ubuntu 24.04 LTS
_Compiler/Version: 64-bit/ GNU 13.2.0
_CMake Version: 3.28.3
_kernel version: Linux 6.8.0-31-generic
_Graphics: Intel UHD Graphics 730 (ADL-S GT1)
_Processor: 12thGen Intel Core i5-12400x12


Hi Arka

Please fix the compilation warning

and try again.

If you still get “illegal instruction”, please run in a debugger that will tell you where the program crashed. And provide a traceback.

John

Dear @allison ,
I fixed the warning and it is now running fine on Ubuntu as well.
For MacOS the warning was not creating any trouble, so I thought it was safe to ignore that.
Clearly I was wrong.

Thanks very much,
Arka

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.