Hi! I’m trying to modifying geometry with UI commands in Geant4 example extended/analysis/AnaEx01. After compiling, I just simply typed ./AnaEx01 and opened a openGL GUI window. And then:
/det/setAbsThick 20 mm
/run/beamOn 1
Then the GUI window crashed, with these outputs:
/det/setAbsThick 20 mm
/run/reinitializeGeometry
/vis/scene/notifyHandlers scene-0
/run/beamOn 1
Start re-initialization because
Geometry
has been modified since last Run.
userDetector->Construct() start.
------------------------------------------------------------
---> The calorimeter is 10 layers of: [ 20mm of G4_Pb + 5mm of G4_lAr ]
------------------------------------------------------------
Obsolete world logical volume is removed from the default region.
World is registered to the default region.
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : modeling0015
issued by : G4PhysicalVolumeModel::Validate
Attempt to validate a volume that is no longer in the physical volume store.
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
WARNING: Model "G4PhysicalVolumeModel World:0 BasePath: TOP" is no longer valid - being removed
from scene "scene-0"
WARNING: No models left in this scene "scene-0".
WARNING: The current scene "scene-0" has no run duration models.
Use "/vis/scene/add/volume" or create a new scene.
WARNING: The current scene "scene-0" has no run duration models.
Use "/vis/scene/add/volume" or create a new scene.
Start closing geometry.
G4GeometryManager::ReportVoxelStats -- Voxel Statistics
Total memory consumed for geometry optimisation: 0 kByte
Total CPU time elapsed for geometry optimisation: 0 seconds
Voxelisation: top CPU users:
Percent Total CPU System CPU Memory Volume
------- ---------- ---------- -------- ----------
0.00 0.00 0.00 1k Calorimeter
0.00 0.00 0.00 0k Layer
Voxelisation: top memory users:
Percent Memory Heads Nodes Pointers Total CPU Volume
------- -------- ------ ------ -------- ---------- ----------
75.96 0k 1 10 10 0.00 Calorimeter
24.04 0k 1 2 4 0.00 Layer
WARNING: The current scene "scene-0" has no run duration models.
Use "/vis/scene/add/volume" or create a new scene.
==============================================================================
--> G4TaskRunManager::ComputeNumberOfTasks() --> 0 tasks with 1 events/task...
==============================================================================
G4WT3 > /control/verbose 2
G4WT2 > /control/verbose 2
G4WT0 > /control/verbose 2
G4WT1 > /control/verbose 2
G4WT1 > /run/verbose 2
G4WT1 > /tracking/storeTrajectory 2
G4WT2 > /run/verbose 2
G4WT1 > /run/reinitializeGeometry
G4WT0 > /run/verbose 2
G4WT3 > /run/verbose 2
G4WT0 > /tracking/storeTrajectory 2
G4WT3 > /tracking/storeTrajectory 2
G4WT0 > /run/reinitializeGeometry
G4WT2 > /tracking/storeTrajectory 2
G4WT3 > /run/reinitializeGeometry
G4WT2 > /run/reinitializeGeometry
Region <DefaultRegionForTheWorld> -- -- appears in <World> world volume
This region is in the mass world.
Root logical volume(s) : World
Pointers : G4VUserRegionInformation[0], G4UserLimits[0], G4FastSimulationManager[0], G4UserSteppingAction[0]
Materials : G4_Galactic G4_Pb G4_lAr
Production cuts : gamma 700 um e- 700 um e+ 700 um proton 700 um
Region <DefaultRegionForParallelWorld> -- -- is not associated to any world.
Root logical volume(s) :
Pointers : G4VUserRegionInformation[0], G4UserLimits[0], G4FastSimulationManager[0], G4UserSteppingAction[0]
Materials :
Production cuts : gamma 700 um e- 700 um e+ 700 um proton 700 um
========= Table of registered couples ============================
Index : 0 used in the geometry : Yes
Material : G4_Galactic
Range cuts : gamma 700 um e- 700 um e+ 700 um proton 700 um
Energy thresholds : gamma 1 keV e- 1 keV e+ 1 keV proton 70 keV
Region(s) which use this couple :
DefaultRegionForTheWorld
Index : 1 used in the geometry : Yes
Material : G4_Pb
Range cuts : gamma 700 um e- 700 um e+ 700 um proton 700 um
Energy thresholds : gamma 94.659 keV e- 1.00699 MeV e+ 946.934 keV proton 70 keV
Region(s) which use this couple :
DefaultRegionForTheWorld
Index : 2 used in the geometry : Yes
Material : G4_lAr
Range cuts : gamma 700 um e- 700 um e+ 700 um proton 700 um
Energy thresholds : gamma 5.20429 keV e- 273.968 keV e+ 266.185 keV proton 70 keV
Region(s) which use this couple :
DefaultRegionForTheWorld
==================================================================
### Run 0 starts.
### Run 0 start.
... set ntuple merging row mode : row-wise - done
... create file : AnaEx01.root - done
... open analysis file : AnaEx01.root - done
... open main analysis file : AnaEx01.root - done
----> Output file is open in AnaEx01.root.
========================================================================================
--> G4TaskRunManager::CreateAndStartWorkers() --> Creating 1 tasks with 1 events/task...
========================================================================================
Adding task 0 to task-group...
G4WT3 > Start re-initialization because
G4WT3 > Geometry
G4WT3 > has been modified since last Run.
G4WT3 > ### Run 0 starts on worker thread 3.
G4WT3 > ### Run 0 start.
G4WT3 > ... set ntuple merging row mode : row-wise - done
G4WT3 > ... create file : AnaEx01_t3.root - done
G4WT3 > ... open analysis file : AnaEx01.root - done
G4WT3 >
----> Output file is open in AnaEx01.root.
G4WT3 >
---> Begin of event: 0
G4WT3 > G4Scene::AddWorldIfEmpty: The scene was empty of run-duration models.
"world" has been added.
G4WT3 > /vis/scene/notifyHandlers
G4WT3 > WARNING: G4VisManager: the scene was empty, "world" has been
added and the scene handlers notified.
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 : 0
G4WT2 > [thread 2] Thread-local run terminated.
G4WT2 > [thread 2] Run Summary
G4WT1 > [thread 1] User=0.050000s Real=0.052140s Sys=0.010000s [Cpu=115.1%]
G4WT2 > [thread 2] Number of events processed : 0
G4WT0 > [thread 0] Thread-local run terminated.
G4WT2 > [thread 2] User=0.050000s Real=0.051802s Sys=0.010000s [Cpu=115.8%]
G4WT0 > [thread 0] Run Summary
G4WT0 > [thread 0] Number of events processed : 0
G4WT0 > [thread 0] User=0.050000s Real=0.051951s Sys=0.010000s [Cpu=115.5%]
G4WT3 > [thread 3] Run Summary
G4WT3 > [thread 3] Number of events processed : 1
G4WT3 > [thread 3] User=0.010000s Real=0.006100s Sys=0.010000s [Cpu=327.9%]
G4WT3 >
--------------------End of Run------------------------------
mean Energy in Absorber : 473.384 MeV +- 0 eV
mean Energy in Gap : 16.6207 MeV +- 0 eV
G4WT3 >
mean trackLength in Absorber : 33.9866 cm +- 0 fm
mean trackLength in Gap : 8.16717 cm +- 0 fm
------------------------------------------------------------
G4WT3 >
----> print histograms statistic
G4WT3 > EAbs: mean = 473.384 MeV rms = 0 eV
G4WT3 > EGap: mean = 16.6207 MeV rms = 0 eV
G4WT3 > LAbs: mean = 33.9866 cm rms = 0 fm
G4WT3 > LGap: mean = 8.16717 cm rms = 0 fm
G4WT3 > ... merge all H1 - done
G4WT3 > ... merge all H2 - done
G4WT3 > ... merge all H3 - done
G4WT3 > ... merge all P1 - done
G4WT3 > ... merge all P2 - done
G4WT3 > ... merge slave ntuples - done
G4WT3 > ... write file : AnaEx01_t3.root - done
G4WT3 > ... close file : AnaEx01_t3.root - done
G4WT3 > ... delete empty file : AnaEx01_t3.root - done
G4WT3 >
----> Histograms and ntuples are saved
Run terminated.
Run Summary
Number of events processed : 1
User=0.030000s Real=0.075780s Sys=0.020000s [Cpu=66.0%]
--------------------End of Run------------------------------
mean Energy in Absorber : 0 eV +- 0 eV
mean Energy in Gap : 0 eV +- 0 eV
mean trackLength in Absorber : 0 fm +- 0 fm
mean trackLength in Gap : 0 fm +- 0 fm
------------------------------------------------------------
----> print histograms statistic
EAbs: mean = 473.384 MeV rms = 0 eV
EGap: mean = 16.6207 MeV rms = 0 eV
LAbs: mean = 33.9866 cm rms = 0 fm
LGap: mean = 8.16717 cm rms = 0 fm
... merge main ntuples - done
... write file : AnaEx01.root - done
QObject::connect: Cannot queue arguments of type 'QList<QPersistentModelIndex>'
(Make sure 'QList<QPersistentModelIndex>' is registered using qRegisterMetaType().)
QObject::connect: Cannot queue arguments of type 'QList<QPersistentModelIndex>'
(Make sure 'QList<QPersistentModelIndex>' is registered using qRegisterMetaType().)
QObject::connect: Cannot queue arguments of type 'QList<QPersistentModelIndex>'
(Make sure 'QList<QPersistentModelIndex>' is registered using qRegisterMetaType().)
QObject::connect: Cannot queue arguments of type 'QList<QPersistentModelIndex>'
(Make sure 'QList<QPersistentModelIndex>' is registered using qRegisterMetaType().)
QObject::connect: Cannot queue arguments of type 'QList<QPersistentModelIndex>'
(Make sure 'QList<QPersistentModelIndex>' is registered using qRegisterMetaType().)
QObject::connect: Cannot queue arguments of type 'QList<QPersistentModelIndex>'
(Make sure 'QList<QPersistentModelIndex>' is registered using qRegisterMetaType().)
QObject::connect: Cannot queue arguments of type 'QList<QPersistentModelIndex>'
(Make sure 'QList<QPersistentModelIndex>' is registered using qRegisterMetaType().)
... close file : AnaEx01.root - done
----> Histograms and ntuples are saved
1 event has been kept for refreshing and/or reviewing.
"/vis/reviewKeptEvents" to review them one by one.
"/vis/enable", then "/vis/viewer/flush" or "/vis/viewer/rebuild" to see them accumulated.
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : visman0501
issued by : G4VViewer::SetTouchable
Volume no longer in physical volume store.
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : visman0501
issued by : G4VViewer::SetTouchable
Volume no longer in physical volume store.
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
/vis/set/touchable
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_M_construct null not valid
### CAUGHT SIGNAL: 6 ### address: 0x3e800000e0d, signal = SIGABRT, value = 6, description = abort program (formerly SIGIOT).
Backtrace:
[PID=3597, TID=-1][ 0/34]> /usr/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb) [0x7f00658a200b]
[PID=3597, TID=-1][ 1/34]> /usr/lib/x86_64-linux-gnu/libc.so.6(abort+0x12b) [0x7f0065881859]
[PID=3597, TID=-1][ 2/34]> /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x9e911) [0x7f0065b0a911]
[PID=3597, TID=-1][ 3/34]> /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xaa38c) [0x7f0065b1638c]
[PID=3597, TID=-1][ 4/34]> /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xaa3f7) [0x7f0065b163f7]
[PID=3597, TID=-1][ 5/34]> /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xaa6a9) [0x7f0065b166a9]
[PID=3597, TID=-1][ 6/34]> /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZSt19__throw_logic_errorPKc+0x41) [0x7f0065b0d21e]
[PID=3597, TID=-1][ 7/34]> /usr/local/bin/geant4/lib/libG4modeling.so(_ZN21G4PhysicalVolumeModel19GetPVNameCopyNoPathERKSt6vectorINS_22G4PhysicalVolumeNodeIDESaIS1_EE+0x2b1) [0x7f0066e24421]
[PID=3597, TID=-1][ 8/34]> /usr/local/bin/geant4/lib/libG4vis_management.so(_ZN9G4VViewer22TouchableSetVisibilityERKSt6vectorIN21G4PhysicalVolumeModel22G4PhysicalVolumeNodeIDESaIS2_EEb+0x1f2) [0x7f0066f0c7a2]
[PID=3597, TID=-1][ 9/34]> /usr/local/bin/geant4/lib/libG4OpenGL.so(_ZN16G4OpenGLQtViewer17setCheckComponentEP15QTreeWidgetItemb+0x194) [0x7f00670794f4]
[PID=3597, TID=-1][10/34]> /usr/local/bin/geant4/lib/libG4OpenGL.so(_ZN16G4OpenGLQtViewer29sceneTreeComponentItemChangedEP15QTreeWidgetItemi+0x91) [0x7f00670796f1]
[PID=3597, TID=-1][11/34]> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(_ZN11QMetaObject8activateEP7QObjectiiPPv+0x7d0) [0x7f0062a261d0]
[PID=3597, TID=-1][12/34]> /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(_ZN11QTreeWidget11itemChangedEP15QTreeWidgetItemi+0x54) [0x7f0063714d24]
[PID=3597, TID=-1][13/34]> /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(+0x459a75) [0x7f006371da75]
[PID=3597, TID=-1][14/34]> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(_ZN7QObject5eventEP6QEvent+0x23a) [0x7f0062a26c2a]
[PID=3597, TID=-1][15/34]> /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(_ZN7QWidget5eventEP6QEvent+0x22d) [0x7f006347125d]
[PID=3597, TID=-1][16/34]> /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(_ZN6QFrame5eventEP6QEvent+0x22) [0x7f006351ed52]
[PID=3597, TID=-1][17/34]> /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(_ZN19QAbstractScrollArea5eventEP6QEvent+0x251) [0x7f00635219d1]
[PID=3597, TID=-1][18/34]> /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(_ZN17QAbstractItemView5eventEP6QEvent+0x143) [0x7f00636a3313]
[PID=3597, TID=-1][19/34]> /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent+0x86) [0x7f006342ea66]
[PID=3597, TID=-1][20/34]> /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(_ZN12QApplication6notifyEP7QObjectP6QEvent+0x330) [0x7f00634380f0]
[PID=3597, TID=-1][21/34]> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(_ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent+0x18a) [0x7f00629fa80a]
[PID=3597, TID=-1][22/34]> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(_ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData+0x148) [0x7f00629fd488]
[PID=3597, TID=-1][23/34]> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(+0x2dee37) [0x7f0062a52e37]
[PID=3597, TID=-1][24/34]> /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x27d) [0x7f0061b9317d]
[PID=3597, TID=-1][25/34]> /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x52400) [0x7f0061b93400]
[PID=3597, TID=-1][26/34]> /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x33) [0x7f0061b934a3]
[PID=3597, TID=-1][27/34]> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x65) [0x7f0062a52435]
[PID=3597, TID=-1][28/34]> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0x12b) [0x7f00629f93ab]
[PID=3597, TID=-1][29/34]> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(_ZN16QCoreApplication4execEv+0x96) [0x7f0062a01116]
[PID=3597, TID=-1][30/34]> /usr/local/bin/geant4/lib/libG4interfaces.so(_ZN6G4UIQt12SessionStartEv+0x10d) [0x7f0066d6ce6d]
[PID=3597, TID=-1][31/34]> ./AnaEx01(+0x7c8d) [0x55a9f6166c8d]
[PID=3597, TID=-1][32/34]> /usr/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7f0065883083]
[PID=3597, TID=-1][33/34]> ./AnaEx01(+0x856e) [0x55a9f616756e]
: Aborted (Signal sent by tkill() 3597 1000)
Aborted
I also found that there’s a small probability that the program can running normally. The warning will persist, but different from what I showed above:
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : modeling0015
issued by : G4PhysicalVolumeModel::Validate
Attempt to validate a volume that is no longer in the physical volume store.
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
WARNING: Model "G4PhysicalVolumeModel World:0 BasePath: TOP" is no longer valid - being removed
from scene "scene-0"
WARNING: No models left in this scene "scene-0".
WARNING: The current scene "scene-0" has no run duration models.
Use "/vis/scene/add/volume" or create a new scene.
WARNING: The current scene "scene-0" has no run duration models.
Use "/vis/scene/add/volume" or create a new scene.
G4Scene::AddWorldIfEmpty: The scene was empty of run-duration models.
"world" has been added.
/vis/scene/notifyHandlers
WARNING: G4VisManager: the scene was empty, "world" has been
added and the scene handlers notified.
Start closing geometry.
Is this a bug? Can anyone help me deal with this problem? Thanks!