Hello,
I am trying to install G4 on Windows 11. So far I have successfully installed the program through VS 2022 using this this tutorial (starting on page 8) with the data=on option, then set the variables following the official postinstall setup page (the editor does not allow me to inset a second link). This procedure seems to be ok.
Then i built the B2 example following the first tutorial again (starting on page 30), with seemingly no issues.
The problem appears when I try to run the .exe file. At first it is slowed by the AVG antivirus for a while (no issues detected), then it finishes, but nothing happens.
The cmd is giving me the following errors:
*** ExceptionHandler is not defined ***
*** G4Exception : UI0002
issued by : G4UIExecutive::G4UIExecutive()
Specified session type is not build in your system,
or no session type is specified.
A fallback session type is used.
*** This is just a warning message. ***
-------- WWWW ------- G4Exception-END -------- WWWW -------
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : UIMAN0123
issued by : G4UImanager::ApplyCommand
Command aborted (400)
Error code : 400
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
For the full cmd message (including the building process) see the attachment.
ERROR: Can not open a macro file <init_vis.mac>. Set macro path with "/control/macroPath" if needed.
The exe has to have access to the mac file(s). Normally (on Unix) you should arrange for the exe to start up in the directory (folder) containing the mac files. Otherwise I guess you can set the macro path as it says.
Thank you for the information and pointing to the “real” error.
I tried to move the .exe file to the B2a folder, where the run1.mac file is located, but with no success.
I put the full cmd message to the attachment again. TryExeInB2aFolder.txt (8.3 KB)
Thanks! That moved things a little!
I reinstalled G4 with suggested option, rebuilt those examples and copied the .exe file to the parent folder.
Now the file starts, but i get “not responding” trait after a while.
The hardware is idle and there is a “not implemented” error in the cmd message (I tried B1 for a change)
G4OpenGLViewer::DrawText: Not implemented for "viewer-0 (OpenGLStoredWin32)"
Called with G4Text: "exampleB1"
layout right, offset (0,0)
Hi again. The message is just a warning. Sorry for verbosity - not sure why it’s so verbose. Still, you should see the detector. Try /run/beam - you should see trajectories. If not try /vis/viewer/refresh and, maybe, /vis/viewer/rebuild. Let us know what happens.
HA! It works!! I truly saw the detector but didn’t do the last step of letting the particles in. Thank a lot for your help (you have actually terminated about a week of pure hell )
Only a note for potential future reader: the command /run/beam was not found, but following this tutorial I found that it was “/run/beamOn”.