G4 11.0.0 inconsistent launch of Qt

This may turn out to be a really stupid question, but here goes anyway… I just did a successful fresh install of Geant4 v11.0.0 and I am running some of the distribution examples to make sure everything is working properly. I installed with OpenGL ON and Qt ON.

When I compiled and ran example B4a, Qt did not launch and I just got the OpenGL window with output to the terminal. (In 10.7.2 and previous versions, I got the Qt window with terminal box and OpenGL pane inside it. I expected that this time too.) I then ran example B4b and I got the Qt window with terminal box and OpenGL pane inside it as per 10.7.2. The ‘Initialize visualization’ of the main program and the init_vis.mac and vis.mac files of the two examples are identical. So what gives with B4a?

I have also run example B1, which implements Qt correctly.

I am running Fedora 35 (Linux 5.15.6-200.fc35.x86_64 #1 SMP Wed Dec 1 13:41:10 UTC 2021 x86_64 GNU/Linux).

As a final question, all the README files for the examples are missing from the distribution. Does anyone know where they are?

Thanks for your help.

Hi John

All work OK for me, including B4a. What version of Qt are you running?

As for the README files, agin, for me, they seem all to be in place - but then I imported from GitLab. Did you use the released tarballs?

All very curious.

John

Hi John,

I am using the tarballs from the 11.0.0 download page.

I just rebuilt the example from a fresh copy of B4a from the distribution examples. When I ran it, I get the same problem. I also noticed this error (I think it was there the last time too):

/vis/open OGL 600x600-0+0
/vis/sceneHandler/create OGL
WARNING: G4VisCommandSceneHandlerCreate::SetNewValue:
Using fallback graphics system: OpenGLStoredX (OGLSX)
/vis/viewer/create ! ! 600x600-0+0
/vis/viewer/refresh

I do not get this with any other example from the distribution that I have tried so far or from my own code built under 11.0.0.

Very strange.

John

Hi John

That would happen if you built with both X11 and Qt but started a terminal (tcsh) session. So it is possible that, say, B1 opens with Qt but B4a opens with tcsh if, for example, exampleB4a.cc requests it or the particular environment variables in the launch directory request it or you have a line in ~/.g4session that requires it - see How to Set Up an Interactive Session — Book For Application Developers 11.0 documentation.

Any further news on the READMEs?

John

Hi John,

Sorry, I forgot to answer you. I am running Qt 5.15.2. Also, I can find no signs of the READMEs in the distribution examples.

John

Hi John,

Good news. I got Qt to work by specifically using the -u qt option, i.e., ./exampleB4a -u qt.

So on your suggestion, I checked my ~/.g4session file and it contains:
Qt # Default session

exampleB4a tcsh

So that’s the problem. In 10.7.2 and previous versions of 10.x, I did not need to specify the -u option to get Qt to work automatically. I suppose somewhere along the way, I unwittingly added the exampleB4a line to the .g4session file.

Thanks for your help.

John

The missing READMEs were added to the distribution tarballs at the start of the week, so will be present in downloads since then.

I redownloaded (is that a word?) the tar ball and got them. Thank you for your assistance.

John

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