Please fill out the following information to help in answering your question, and also see tips for posting code snippets. If you don’t provide this information it will take more time to help with your problem!
Geant4 Version: 11.2.2
Operating System: MacOS Sonoma14.2
Compiler/Version: clang-1500.1.0.2.5
CMake Version: 3.29.5
I can run exampleB1 in terminal but cannot visualize it with a direct run of
Here is how I configure to build g4:
cmake -DCMAKE_INSTALL_PREFIX=/Users/liling/geant4/install_11.2.2 -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_OPENGL_X11=OFF -DGEANT4_USE_QT=ON -DGEANT4_USE_QT_QT6=ON -DGEANT4_USE_VTK=ON -DGEANT4_USE_SYSTEM_EXPAT=OFF ../geant4-11.2.2
and configure to build exampleB1:
cmake -DCMAKE_PREFIX_PATH=/usr/local/opt/qt@5 ..
Here is what I got after running
./exampleB1
:
# Visualization setting
/control/execute vis.mac
# Macro file for the visualization setting in the initialization phase
# of the B1 example when running in interactive mode
#
# Use these open statements to open selected visualization
#
# Use this open statement to create an OpenGL view:
/vis/open OGL 600x600-0+0
/vis/sceneHandler/create OGL
parameter value (OGL) is not listed in the candidate List.
Candidates are: ASCIITree ATree DAWNFILE G4HepRepFile HepRepFile RayTracer VRML2FILE gMocrenFile TOOLSSG_OFFSCREEN TSG_OFFSCREEN TOOLSSG_OFFSCREEN TSG_OFFSCREEN TSG_FILE Qt3D TOOLSSG_QT_ZB TSG_QT_ZB TSGQtZB TSG VtkNative VTKN VtkOffscreen VTK_OFFSCREEN VtkQt VTKQt VTKQt Vtk VTK
sub-command "/vis/sceneHandler/create" failed.
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)
Qt3D (Qt3D)
TOOLSSG_QT_ZB (TSG_QT_ZB, TSGQtZB, TSG)
VtkNative (VTKN, VTKQt_FALLBACK)
VtkOffscreen (VTK_OFFSCREEN)
VtkQt (VTKQt, VTKQt, Vtk, VTK)
Default graphics system is: Vtk (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.
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : UIMAN0123
issued by : G4UImanager::ApplyCommand
Invoked command has failed - see above.
Error code : 500
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
***** Illegal parameter (0) </vis/open OGL 600x600-0+0> *****
***** Batch is interrupted!! *****
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : UIMAN0123
issued by : G4UImanager::ApplyCommand
Command aborted (500)
Error code : 500
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
***** Illegal parameter (0) </control/execute vis.mac> *****
***** Batch is interrupted!! *****
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : UIMAN0123
issued by : G4UImanager::ApplyCommand
Command aborted (500)
Error code : 500
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
I also tried Qt3D (/vis/open Qt3D) and it just crashed and said
qt.qpa.fonts: Populating font family aliases took 423 ms. Replace uses of missing font family "Garamond" with one that exists to avoid this cost.
2025-01-12 22:55:22.284 exampleB1[69829:22699347] TSM AdjustCapsLockLEDForKeyTransitionHandling - _ISSetPhysicalKeyboardCapsLockLED Inhibit
/vis/open Qt3D
/vis/sceneHandler/create Qt3D
/vis/viewer/create ! ! 600x600-0+0
Qt3D.Renderer.RHI.Backend: Initializing RHI with Metal backend
/vis/viewer/refresh
[1] 69829 segmentation fault ./exampleB1
I also tried vtkqt but there was only pure black:
I want to know how I can visualize it. I used to use g4 v10 before and it worked but now I cannot build that version.
I