Having trouble when trying to run advanced examples in interactive and visualization mode

Geant4 Version: 11.1.2
Operating System: Mac OS 13.5.2 (22G91) with M2 Pro chip
Compiler/Version: Sry but I dont know
CMake Version: 3.27.6


I am a beginer to Geant4 and I have been learning it with some examples. I installed Geant4 on my Macbook Pro (M2 pro chip) from source code. I can run all the basic examples smoothly in an interactive mode and with Qt5 as the visualization program. However, when I tried to run some advanced examples (i.e. air shower, eRosita) , I have trouble with starting the program interactively. The qt5 window does not show and an error report occur. Below I list the error report when I try to run eRosita interactively and some information about my Geant4 installation.

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               eRosita [34227]
Path:                  /Users/USER/*/eRosita
Identifier:            eRosita
Version:               ???
Code Type:             ARM-64 (Native)
Parent Process:        zsh [28840]
Responsible:           Terminal [480]
User ID:               501

Date/Time:             2023-11-14 11:24:07.3673 +0800
OS Version:            macOS 13.5.2 (22G91)
Report Version:        12
Anonymous UUID:        D9142926-31D8-86FC-E150-99DB9D6007CC

Sleep/Wake UUID:       5BFDC6D6-E52D-4846-A632-7E84AE155FFB

Time Awake Since Boot: 110000 seconds
Time Since Wake:       5011 seconds

System Integrity Protection: enabled

Crashed Thread:        9

Exception Type:        EXC_BREAKPOINT (SIGTRAP)
Exception Codes:       0x0000000000000001, 0x0000000194131240

Termination Reason:    Namespace SIGNAL, Code 5 Trace/BPT trap: 5
Terminating Process:   exc handler [34227]

Application Specific Information:
-[NSOpenGLContext update] must be called from the main thread if the context has a view.

...... 
( Thread 0 to 8 is ommited because I think they are irrelevant)
......

Thread 9 Crashed:
0   AppKit                        	       0x194131240 -[NSOpenGLContext update] + 424
1   libqcocoa.dylib               	       0x10b8d621c 0x10b87c000 + 369180
2   libqcocoa.dylib               	       0x10b8d5330 0x10b87c000 + 365360
3   QtGui                         	       0x108a9a294 QOpenGLContext::makeCurrent(QSurface*) + 172
4   QtOpenGL                      	       0x105957384 QGLContext::makeCurrent() + 108
5   QtOpenGL                      	       0x105957cb8 QGLWidget::makeCurrent() + 32
6   libG4vis_management.dylib     	       0x10541b1a8 G4VisManager::G4VisSubThread(void*) + 364
7   libG4vis_management.dylib     	       0x105424e00 void* std::__1::__thread_proxy[abi:v160006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void* (*)(void*), G4VisManager*>>(void*) + 52
8   libsystem_pthread.dylib       	       0x190b77fa8 _pthread_start + 148
9   libsystem_pthread.dylib       	       0x190b72da0 thread_start + 8


Thread 9 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
    x4: 0x0000000000000000   x5: 0x0000000000000000   x6: 0x0000000000000000   x7: 0x0000000000000000
    x8: 0x1eb363402e9700da   x9: 0x1eb363402e9700da  x10: 0xfffffffe6f6663bb  x11: 0x000060000057c000
   x12: 0x0000000000000100  x13: 0x00000000001ff800  x14: 0x00000000000007fb  x15: 0x000000009a01d802
   x16: 0xfffffffffffffff4  x17: 0x00000001f071ff98  x18: 0x0000000000000000  x19: 0x00006000038c31e0
   x20: 0x00000001506d0130  x21: 0x00006000038c31e8  x22: 0x000000010b944188  x23: 0x00006000037b9f20
   x24: 0x0000000000000000  x25: 0x0000000000000000  x26: 0x0000000000000000  x27: 0x0000600000736490
   x28: 0x0000000000000000   fp: 0x000000016b5f6d10   lr: 0x8f5f800194131240
    sp: 0x000000016b5f6cd0   pc: 0x0000000194131240 cpsr: 0x60001000
   far: 0x000000010f46c000  esr: 0xf2000001 (Breakpoint) brk 1

......
(more information)
......

and here is the last few sentences in my terminal when this problem occured:

G4VisManager: Using G4TrajectoryDrawByCharge as fallback trajectory model.
See commands in /vis/modeling/trajectories/ for other options.
### Run 0 starts.
--- Run 0 (master) start.
zsh: trace trap  ./eRosita

Before I install Geant4, I use Homebrew to install cmake, clhep and qt5 on my computer. After I set some environment variables for qt5 in the .zshrc profile, I compile Geant4 from source code with the following cmake command:

cmake -DCMAKE_INSTALL_PREFIX=~/geant4-v11.1.2/install - DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_QT=ON - DGEANT4_INSTALL_PACKAGE_CACHE=OFF ~/geant4-v11.1.2/source

Hope these information can help you with my problem. Thx!

Hi Ruixuan,

Do you still have the same problem if you run the eRosita example in batch mode instead of interactive mode?

./eRosita eRosita.in

Thanks,
James

Hi jamesv,

Running this example in batch mode seems OK,here is what the terminal shows after I run ./eRosita eRosita.in

**************************************************************
 Geant4 version Name: geant4-11-01-patch-02 [MT]   (15-June-2023)
  << in Multi-threaded mode >> 
                       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/
**************************************************************

***********************
** Seed: 1 **
***********************
=============================================================================================
......
(I omit this part due to word limitation of this post)
......
=============================================================================================


The materials defined are : 
......
(I omit this part due to word limitation of this post)
......

G4SDManager::AddNewCollection : the collection <TrackerChamberSD/TrackerCollection> is registered at 1
New sensitive detector <TrackerChamberSD> is registered at /eRosita/
=======================================================================
======                 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                                0
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  Universal
Use built-in Birks satuaration                     0
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

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 ======
    LivermoreCompton : 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 ======
 LivermoreConversion : 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 TeV Nbins=84 100 eV  - 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 ======
       LowEnergyIoni : Emin=    0 eV  Emax=  100 TeV  deltaVI

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 ======
           LowEnBrem : Emin=    0 eV  Emax=    1 GeV  AngularGen2BS
            eBremLPM : Emin=    1 GeV Emax=  100 TeV  ModifiedTsai

msc:  for e+  SubType= 10
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
            UrbanMsc : Emin=    0 eV  Emax=  100 TeV Nbins=84 100 eV  - 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 ======
           LowEnBrem : Emin=    0 eV  Emax=    1 GeV  AngularGen2BS
            eBremLPM : Emin=    1 GeV Emax=  100 TeV  ModifiedTsai

annihil:  for e+ XStype:2 SubType=5 BuildTable=0
      ===== EM models for the G4Region  DefaultRegionForTheWorld ======
            PenAnnih : Emin=    0 eV  Emax=  100 TeV

msc:  for proton  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 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

msc:  for anti_proton  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 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

=========================================================================
--> G4TaskRunManager::CreateAndStartWorkers() --> Initializing workers...
=========================================================================

/gun/energy 100 MeV
/gun/particle proton
/run/verbose 2
/tracking/verbose 0
/run/beamOn 1000

Region <DefaultRegionForTheWorld> --  -- appears in <World> world volume
 This region is in the mass world.
 Root logical volume(s) : World 
 Pointers : G4VUserRegionInformation[0x0], G4UserLimits[0x0], G4FastSimulationManager[0x0], G4UserSteppingAction[0x0]
 Materials : Galactic Copper Silicon 
 Production cuts :   gamma 1 um      e- 1 um      e+ 1 um  proton 1 um 

Region <DefaultRegionForParallelWorld> --  -- is not associated to any world.
 Root logical volume(s) : 
 Pointers : G4VUserRegionInformation[0x0], G4UserLimits[0x0], G4FastSimulationManager[0x0], G4UserSteppingAction[0x0]
 Materials : 
 Production cuts :   gamma 1 um      e- 1 um      e+ 1 um  proton 1 um 

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

Index : 0     used in the geometry : Yes
 Material : Galactic
 Range cuts        :  gamma  1 um     e-  1 um     e+  1 um  proton 1 um 
 Energy thresholds :  gamma  250 eV     e-  250 eV     e+  250 eV  proton 100 eV 
 Region(s) which use this couple : 
    DefaultRegionForTheWorld

Index : 1     used in the geometry : Yes
 Material : Copper
 Range cuts        :  gamma  1 um     e-  1 um     e+  1 um  proton 1 um 
 Energy thresholds :  gamma  250 eV     e-  6.73163 keV    e+  6.59835 keV proton 100 eV 
 Region(s) which use this couple : 
    DefaultRegionForTheWorld

Index : 2     used in the geometry : Yes
 Material : Silicon
 Range cuts        :  gamma  1 um     e-  1 um     e+  1 um  proton 1 um 
 Energy thresholds :  gamma  250 eV     e-  847.233 eV     e+  834.691 eV  proton 100 eV 
 Region(s) which use this couple : 
    DefaultRegionForTheWorld

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

### Run 0 starts.
--- Run 0 (master) start.
G4WT2 > /gun/energy 100 MeV
G4WT3 > /gun/energy 100 MeV
G4WT2 > /gun/particle proton
G4WT1 > /gun/energy 100 MeV
G4WT0 > /gun/energy 100 MeV
G4WT2 > /run/verbose 2
G4WT3 > /gun/particle proton
G4WT0 > /gun/particle proton
G4WT3 > /run/verbose 2
G4WT0 > /run/verbose 2
G4WT3 > /tracking/verbose 0
G4WT2 > /tracking/verbose 0
G4WT0 > /tracking/verbose 0
G4WT1 > /gun/particle proton
G4WT1 > /run/verbose 2
G4WT1 > /tracking/verbose 0

==========================================================================================
--> G4TaskRunManager::CreateAndStartWorkers() --> Creating 32 tasks with 31 events/task...
==========================================================================================

Adding task 0 to task-group...
Adding task 1 to task-group...
Adding task 2 to task-group...
Adding task 3 to task-group...
Adding task 4 to task-group...
Adding task 5 to task-group...
Adding task 6 to task-group...
Adding task 7 to task-group...
Adding task 8 to task-group...
Adding task 9 to task-group...
Adding task 10 to task-group...
Adding task 11 to task-group...
Adding task 12 to task-group...
Adding task 13 to task-group...
Adding task 14 to task-group...
Adding task 15 to task-group...
Adding task 16 to task-group...
Adding task 17 to task-group...
Adding task 18 to task-group...
Adding task 19 to task-group...
Adding task 20 to task-group...
Adding task 21 to task-group...
Adding task 22 to task-group...
Adding task 23 to task-group...
Adding task 24 to task-group...
Adding task 25 to task-group...
Adding task 26 to task-group...
Adding task 27 to task-group...
Adding task 28 to task-group...
Adding task 29 to task-group...
Adding task 30 to task-group...
Adding task 31 to task-group...
Adding task 32 to task-group...
G4WT3 > ### Run 0 starts on worker thread 3.
G4WT3 > --- Run 0 (worker) start.
G4WT1 > ### Run 0 starts on worker thread 1.
G4WT1 > --- Run 0 (worker) start.
G4WT2 > ### Run 0 starts on worker thread 2.
G4WT2 > --- Run 0 (worker) start.
G4WT0 > ### Run 0 starts on worker thread 0.
G4WT0 > --- Run 0 (worker) start.
G4WT3 > >>> Event: 0
G4WT3 >     0 trajectories stored in this event.
G4WT1 > >>> Event: 31
G4WT1 >     0 trajectories stored in this event.
G4WT2 > >>> Event: 62
G4WT2 >     0 trajectories stored in this event.
......
(similar information, I omit them)
.....
G4WT3 > >>> Event: 30
G4WT3 >     0 trajectories stored in this event.
G4WT1 > >>> Event: 61
G4WT1 >     0 trajectories stored in this event.
G4WT1 > ---- eRosita number of events: 200
G4WT1 > >>> Event: 200
G4WT1 >     0 trajectories stored in this event.
G4WT3 > ---- eRosita number of events: 300
G4WT3 > >>> Event: 300
G4WT3 >     0 trajectories stored in this event.
G4WT2 > ---- eRosita number of events: 400
G4WT2 > >>> Event: 400
G4WT2 >     0 trajectories stored in this event.
G4WT2 > ---- eRosita number of events: 500
G4WT2 > >>> Event: 500
G4WT2 >     0 trajectories stored in this event.
G4WT1 > ---- eRosita number of events: 600
G4WT1 > >>> Event: 600
G4WT1 >     0 trajectories stored in this event.
G4WT0 > ---- eRosita number of events: 700
G4WT0 > >>> Event: 700
G4WT0 >     0 trajectories stored in this event.
G4WT2 > ---- eRosita number of events: 800
G4WT2 > >>> Event: 800
G4WT2 >     0 trajectories stored in this event.
G4WT2 > ---- eRosita number of events: 900
G4WT2 > >>> Event: 900
G4WT2 >     0 trajectories stored in this event.
G4WT3 > ---- eRosita number of events: 1000
G4WT2 > [thread 2] Thread-local run terminated.
G4WT3 > [thread 3] Thread-local run terminated.
G4WT1 > [thread 1] Thread-local run terminated.
G4WT1 > [thread 1] Run Summary
G4WT1 > [thread 1]   Number of events processed : 248
G4WT2 > [thread 2] Run Summary
G4WT1 > [thread 1]   User=1.220000s Real=0.310544s Sys=0.010000s [Cpu=396.1%]
G4WT0 > [thread 0] Thread-local run terminated.
G4WT0 > [thread 0] Run Summary
G4WT0 > [thread 0]   Number of events processed : 248
G4WT3 > [thread 3] Run Summary
G4WT0 > [thread 0]   User=1.220000s Real=0.310345s Sys=0.010000s [Cpu=396.3%]
G4WT3 > [thread 3]   Number of events processed : 256
G4WT2 > [thread 2]   Number of events processed : 248
G4WT3 > [thread 3]   User=1.230000s Real=0.312543s Sys=0.010000s [Cpu=396.7%]
G4WT0 > --- Run 0 (worker) end.
G4WT3 > --- Run 0 (worker) end.
G4WT0 >   User=1.220000s Real=0.310430s Sys=0.010000s [Cpu=396.2%]
G4WT3 >   User=1.230000s Real=0.312632s Sys=0.010000s [Cpu=396.6%]
G4WT2 > [thread 2]   User=0.020000s Real=0.006693s Sys=0.000000s [Cpu=298.8%]
G4WT2 > --- Run 0 (worker) end.
G4WT1 > --- Run 0 (worker) end.
G4WT1 >   User=1.220000s Real=0.310653s Sys=0.010000s [Cpu=395.9%]
G4WT2 >   User=1.220000s Real=0.310520s Sys=0.010000s [Cpu=396.1%]
 Run terminated.
Run Summary
  Number of events processed : 1000
  User=1.620000s Real=0.412979s Sys=0.010000s [Cpu=394.7%]
--- Run 0 (master) end. Total number of events: 1000.
  User=1.620000s Real=0.413102s Sys=0.010000s [Cpu=394.6%]
G4WT2 > Destroying WorkerRunManager (0x160011b80)
G4WT0 > Destroying WorkerRunManager (0x156f11780)
G4WT2 > G4 kernel has come to Quit state.
G4WT1 > Destroying WorkerRunManager (0x156e83c10)
G4WT1 > G4 kernel has come to Quit state.
G4WT0 > G4 kernel has come to Quit state.
G4WT3 > Destroying WorkerRunManager (0x160111340)
G4WT3 > G4 kernel has come to Quit state.
G4WT2 > UserDetectorConstruction deleted.
G4WT2 > UserPhysicsList deleted.
G4WT2 > UserActionInitialization deleted.
G4WT1 > UserDetectorConstruction deleted.
G4WT1 > UserPhysicsList deleted.
G4WT1 > UserActionInitialization deleted.
G4WT2 > UserWorkerInitialization deleted.
G4WT0 > UserDetectorConstruction deleted.
G4WT2 > UserWorkerThreadInitialization deleted.
G4WT1 > UserWorkerInitialization deleted.
G4WT0 > UserPhysicsList deleted.
G4WT3 > UserDetectorConstruction deleted.
G4WT0 > UserActionInitialization deleted.
G4WT0 > UserWorkerInitialization deleted.
G4WT2 > UserRunAction deleted.
G4WT1 > UserWorkerThreadInitialization deleted.
G4WT1 > UserRunAction deleted.
G4WT0 > UserWorkerThreadInitialization deleted.
G4WT2 > UserPrimaryGenerator deleted.
G4WT3 > UserPhysicsList deleted.
G4WT1 > UserPrimaryGenerator deleted.
G4WT3 > UserActionInitialization deleted.
G4WT2 > RunManager is deleting RunManagerKernel.
G4WT3 > UserWorkerInitialization deleted.
G4WT3 > UserWorkerThreadInitialization deleted.
G4WT0 > UserRunAction deleted.
G4WT2 > G4SDManager deleted.
G4WT3 > UserRunAction deleted.
G4WT0 > UserPrimaryGenerator deleted.
G4WT0 > RunManager is deleting RunManagerKernel.
G4WT2 > EventManager deleted.
G4WT3 > UserPrimaryGenerator deleted.
G4WT3 > RunManager is deleting RunManagerKernel.
G4WT2 > Units table cleared.
G4WT3 > G4SDManager deleted.
G4WT0 > G4SDManager deleted.
G4WT3 > EventManager deleted.
G4WT2 > TransportationManager deleted.
G4WT1 > RunManager is deleting RunManagerKernel.
G4WT0 > EventManager deleted.
G4WT0 > Units table cleared.
G4WT3 > Units table cleared.
G4WT2 > Total navigation history collections cleaned: 7
G4WT1 > G4SDManager deleted.
G4WT2 > ================== Deleting memory pools ===================
G4WT0 > TransportationManager deleted.
G4WT0 > Total navigation history collections cleaned: 7
G4WT1 > EventManager deleted.
G4WT0 > ================== Deleting memory pools ===================
G4WT2 > Pool ID '20G4NavigationLevelRep', size : 0.00769 MB
G4WT2 > Pool ID '24G4ReferenceCountedHandleIvE', size : 0.000961 MB
G4WT1 > Units table cleared.
G4WT2 > Pool ID '7G4Event', size : 0.000961 MB
G4WT3 > TransportationManager deleted.
G4WT3 > Total navigation history collections cleaned: 7
G4WT3 > ================== Deleting memory pools ===================
G4WT3 > Pool ID '20G4NavigationLevelRep', size : 0.00769 MB
G4WT1 > TransportationManager deleted.
G4WT0 > Pool ID '20G4NavigationLevelRep', size : 0.00769 MB
G4WT1 > Total navigation history collections cleaned: 7
G4WT1 > ================== Deleting memory pools ===================
G4WT0 > Pool ID '24G4ReferenceCountedHandleIvE', size : 0.000961 MB
G4WT1 > Pool ID '20G4NavigationLevelRep', size : 0.00769 MB
G4WT3 > Pool ID '24G4ReferenceCountedHandleIvE', size : 0.000961 MB
G4WT3 > Pool ID '7G4Event', size : 0.000961 MB
G4WT3 > Pool ID '15G4PrimaryVertex', size : 0.000961 MB
G4WT1 > Pool ID '24G4ReferenceCountedHandleIvE', size : 0.000961 MB
G4WT3 > Pool ID '17G4PrimaryParticle', size : 0.000961 MB
G4WT1 > Pool ID '7G4Event', size : 0.000961 MB
G4WT0 > Pool ID '7G4Event', size : 0.000961 MB
G4WT0 > Pool ID '15G4PrimaryVertex', size : 0.000961 MB
G4WT1 > Pool ID '15G4PrimaryVertex', size : 0.000961 MB
G4WT2 > Pool ID '15G4PrimaryVertex', size : 0.000961 MB
G4WT1 > Pool ID '17G4PrimaryParticle', size : 0.000961 MB
G4WT2 > Pool ID '17G4PrimaryParticle', size : 0.000961 MB
G4WT0 > Pool ID '17G4PrimaryParticle', size : 0.000961 MB
G4WT3 > Pool ID '15G4HCofThisEvent', size : 0.000961 MB
G4WT1 > Pool ID '15G4HCofThisEvent', size : 0.000961 MB
G4WT3 > Pool ID '16G4HitsCollection', size : 0.000961 MB
G4WT1 > Pool ID '16G4HitsCollection', size : 0.000961 MB
G4WT3 > Pool ID '17G4DynamicParticle', size : 0.189 MB
G4WT0 > Pool ID '15G4HCofThisEvent', size : 0.000961 MB
G4WT2 > Pool ID '15G4HCofThisEvent', size : 0.000961 MB
G4WT0 > Pool ID '16G4HitsCollection', size : 0.000961 MB
G4WT1 > Pool ID '17G4DynamicParticle', size : 0.196 MB
G4WT0 > Pool ID '17G4DynamicParticle', size : 0.192 MB
G4WT3 > Pool ID '7G4Track', size : 0.378 MB
G4WT2 > Pool ID '16G4HitsCollection', size : 0.000961 MB
G4WT2 > Pool ID '17G4DynamicParticle', size : 0.192 MB
G4WT1 > Pool ID '7G4Track', size : 0.392 MB
G4WT0 > Pool ID '7G4Track', size : 0.385 MB
G4WT2 > Pool ID '7G4Track', size : 0.384 MB
G4WT3 > Pool ID '18G4TouchableHistory', size : 0.000961 MB
G4WT3 > Pool ID '15G4CountedObjectIvE', size : 0.000961 MB
G4WT3 > Number of memory pools allocated: 11; of which, static: 0
G4WT3 > Dynamic pools deleted: 11 / Total memory freed: 0.58 MB
G4WT3 > ============================================================
G4WT3 > G4Allocator objects are deleted.
G4WT3 > Thread-local UImanager is to be deleted.
G4WT3 > There should not be any thread-local G4cout/G4cerr hereafter.
G4WT1 > Pool ID '18G4TouchableHistory', size : 0.000961 MB
G4WT1 > Pool ID '15G4CountedObjectIvE', size : 0.000961 MB
G4WT1 > Pool ID '17eRositaTrackerHit', size : 0.000961 MB
G4WT0 > Pool ID '18G4TouchableHistory', size : 0.000961 MB
G4WT1 > Number of memory pools allocated: 12; of which, static: 0
G4WT0 > Pool ID '15G4CountedObjectIvE', size : 0.000961 MB
G4WT0 > Pool ID '17eRositaTrackerHit', size : 0.000961 MB
G4WT2 > Pool ID '18G4TouchableHistory', size : 0.000961 MB
G4WT0 > Number of memory pools allocated: 12; of which, static: 0
G4WT0 > Dynamic pools deleted: 12 / Total memory freed: 0.59 MB
UImanager deleted.
StateManager deleted.
RunManagerKernel is deleted. Good bye :)
G4WT0 > ============================================================
G4WT0 > G4Allocator objects are deleted.
RunManager is deleted.
G4WT2 > Pool ID '15G4CountedObjectIvE', size : 0.000961 MB
G4WT1 > Dynamic pools deleted: 12 / Total memory freed: 0.6 MB
G4WT0 > Thread-local UImanager is to be deleted.
G4WT0 > There should not be any thread-local G4cout/G4cerr hereafter.
G4WT1 > ============================================================
G4WT2 > Pool ID '17eRositaTrackerHit', size : 0.000961 MB
G4WT2 > Number of memory pools allocated: 12; of which, static: 0
G4WT2 > Dynamic pools deleted: 12 / Total memory freed: 0.59 MB
G4WT1 > G4Allocator objects are deleted.
G4WT1 > Thread-local UImanager is to be deleted.
G4WT1 > There should not be any thread-local G4cout/G4cerr hereafter.
G4WT2 > ============================================================
UImanager deleted.G4WT2 > G4Allocator objects are deleted.

StateManager deleted.
RunManagerKernel is deleted. Good bye :)
RunManager is deleted.
G4WT2 > Thread-local UImanager is to be deleted.
G4WT2 > There should not be any thread-local G4cout/G4cerr hereafter.
UImanager deleted.
StateManager deleted.
RunManagerKernel is deleted. Good bye :)
RunManager is deleted.
UImanager deleted.
StateManager deleted.
RunManagerKernel is deleted. Good bye :)
RunManager is deleted.
G4 kernel has come to Quit state.
UserDetectorConstruction deleted.
UserPhysicsList deleted.
UserActionInitialization deleted.
UserWorkerInitialization deleted.
UserWorkerThreadInitialization deleted.
UserRunAction deleted.
UserPrimaryGenerator deleted.
RunManager is deleting RunManagerKernel.
G4SDManager deleted.
EventManager deleted.
Units table cleared.
TransportationManager deleted.
Total navigation history collections cleaned: 3
G4RNGHelper object is deleted.
================== Deleting memory pools ===================
Pool ID '20G4NavigationLevelRep', size : 0.00288 MB
Pool ID '24G4ReferenceCountedHandleIvE', size : 0.000961 MB
Pool ID '16G4SmartVoxelNode', size : 0.000961 MB
Pool ID '17G4SmartVoxelProxy', size : 0.000961 MB
Pool ID '15G4CountedObjectIvE', size : 0.000961 MB
Number of memory pools allocated: 5; of which, static: 0
Dynamic pools deleted: 5 / Total memory freed: 0.0067 MB
============================================================
G4Allocator objects are deleted.
UImanager deleted.
StateManager deleted.
RunManagerKernel is deleted. Good bye :)
RunManager is deleted.

and I got a TrackerPhotonEnergy.out file which has content of

0.00488407
0.0644619
0.00163845
0.0457341

Hi Ruixuan

I see the behaviour you report. There is something strange about eRosita, and I will look into it. Meanwhile, try /vis/open TSG - should work with 11.1.2. You don’t get all features of OGL but it’s pretty close. In particular, it does not switch threads (which is where the problem seems to be); instead it displays kept events (the vis manger keeps events for later review, limited to 100 by default, so if you run more than 100, you still only see 100, but that’s usually enough for debugging).

John

Hi John

I do as you told. After changing the /vis/open OGL to /vis/open TSG in vis.mac, I can now run eRosita visualization with the TOOLSSG_QT_GLES.

I notice that when I try to use /vis/open OGL in the vis.mac (to run other examples such as B1), the visualization window is ‘OpenGLStoredQt’ ( as fig1 shows); if I use /vis/open TSG in the vis.mac, the visualizaiton window is ‘TOOLSSG_QT_GLES’ (as fig2 shows). I am a little confused about the relation between OpenGL, TSG and Qt: Are OGL and TSG all visualization drivers and they can substitute each other? Is Qt some sort of backend for OGL and TSG?

Also,I find that if I use TSG, I can not move the object in the visualization window – I can just rotate them. But is I use OGL, I can either move or rotate the objects. Is this a bug or just a different feature of OGL and TSG?

In addtion, this problem – the OGL visualization problem – is not limited to eRosita. Some other examples, like the air_shower, the xray_telescope, have the same problem. But all basic examples and some advanced examples (e.g. human_phantom) are good.

As for the last thing you mentioned, do you mean the circumstance I show in fig3 when I run example B1 for 500 events? If so, it does not bother me so far:)

Sry for my stupid questions and thanks a lot for your help!

OK. Great. I have not been able to figure out why eRosita crashes when switching to the vis sub-thread, but here’s another solution. If you are just debugging, it’s probably sufficiently performant using serial mode. Works fine with OGL. I did this by defining environment variable G4RUN_MANAGER_TYPE to Serial:

export G4RUN_MANAGER_TYPE=Serial

or with a C-type shell:

setenv G4RUN_MANAGER_TYPE Serial

See How to Define the main() Program — Book For Application Developers 11.2 documentation

Anyway, as you have discovered, batch running works fine. Even in interactive mode you can /vis/disable and run as many events as you want in multithreading.

Yes. See start for list of registered drivers. They are interchangeable - to a first approximation. Some write to file for off-line browsing.

Qt is a cross-platform GUI (Graphical User Interface) system which allows us to design windows, handles mouse clicks, etc., and accepts various graphical drawing systems, including OpenGL, Vtk, and Qt3D (it’s own drawing system). Try some of those drivers.

Just a difference - TSG is not (yet) as richly featured as the very mature OGL.

OK, great. But Serial will get this feature back for you, with both OGL and TSG.

Thx John!

After setting export G4RUN_MANAGER_TYPE=Serial in the terminal to set the running mode to serial, the visualization of all examples with OGL is all good.

Thx again for helping me solve the problem and I hope you can succeed finding out the bug in eRosita.

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