COMMAND NOT FOUND </vis/scene/create>

I am trying to run a macro in interactive mode. For example: ./executable vis_macro.mac.

The vis_macro.mac works fine but it stops at /vis/scene/create, as follows:

***** COMMAND NOT FOUND </vis/scene/create> *****

***** Batch is interrupted!! *****

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : UIMAN0123
issued by : G4UImanager::ApplyCommand
Command aborted (100)
Error code : 100
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

The code works fine in batch mode (when I cancel out /vis/… commands). But I would also like to visualize it sometimes.

PS when I run the executable alone (./executable) it gives a different error:

X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 19 (X_DeleteProperty)
Resource id in failed request: 0x0
Serial number of failed request: 100
Current serial number in output stream: 104

Maybe you haven’t instantiated the vis manager. See Application Developers Guide or any of our examples for how to do this.

Hi Allison,

It was really working fine, and my main() function I didn’t change anything there. It is like all of a sudden not working. Can this happen?

Oh and btw, visualization for example B1, …etc works fine, but for this specific code it stopped working.

EDIT: could setting/unsetting environment variables affect that? because it’s the only thing I did in the past few days.

Environment variables. Well, yes. Best not to set any VIS ones.

Do you know how to unset them or go back to default, something like that?

Can you not start with a clean environment, then set the G4 environment as described in the Installation Guide - source (That might be source

But for many years now, I think, you do not need any VIS environment variables if you follow the Installation Guide…

If you cannot figure out how to start with a clean environment, there is an unset shell command. Try

env | grep G4 # to see what G4 environment variables have been set
unset G4VIS_NONE # for example