macOSX/XQuartz: scene tree and viewer empty

Dear Geant4 Users,

I am new to Geant4 and I am trying to run the first examples given in the documentation.
I am working remotely on lxplus and use the software from CVMFS. I can successfully compile and run the basic examples interactively (>$ examples/basic/B1/exampleB1), the interactive window pops up and everything looks good except for the empty viewer-0. The Scene tree is also empty.

I see this issue when connecting to lxplus from my local mac machine (OSX 10.15.7), but not when connecting to lxplus from another linux machine (Debian 10.9 for that matters), so this is probably not an issue with the installation, but rather with the display forwarding on mac and/or with XQuartz (I am using the most up-to-date version: 2.8.1). The Geant4 output looks correct in both cases.

This issue has already been described in 2019 here: Qt viewer: scene tree empty, but remains unsolved (there was a ping on the thread for a similar one year ago, without more success).
This other thread Remote visualisation problem also suggests to change

defaults write org.macosforge.xquartz.X11 enable_iglx -bool true

which didn’t help in my case (this describes another issue).

Any idea is welcome!
Cheers,
Antoine

PS: Geant4 setup if needed:

source /cvmfs/sft.cern.ch/lcg/views/LCG_100/x86_64-centos7-gcc10-opt/setup.sh
cd /cvmfs/sft.cern.ch/lcg/views/LCG_100/x86_64-centos7-gcc10-opt/bin/
source geant4.sh

Hi Antoine

People have had problems with the latest version of XQuartz, although not exactly the same problem as yours, I think (I would have to do more research). But I recommend staying with XQuartz 2.7.11 (xorg-server 1.18.4) for now. Is it possible for you to back-install XQuartz and try it for us?

John

Hello John,

Thanks for your reply and sorry it took me so long: I indeed try to roll back to XQuartz 2.7.11 but then I could not forward any display anymore. Running exampleB1 hung indefinitely, but I also had trouble connecting to other remote servers and could not use display myPlot.png on any remote machine. I searched solutions for this problem for a while, but I had to roll back again to 2.8.1.

So I think using 2.7.11 is not an option for me :frowning:

Best,
Antoine

Hi Antoine

OK. Thanks for trying this. I have not tried 2.8 myself, but I wonder if OpenGL protocol has to be turned on explicitly? Does xdpyinfo show the GLX extension?

$ xdpyinfo
  ...
number of extensions:    23
    ...
    GLX

If not, it will have to be added/installed/activated. Not sure how.

John

Hi Antoine

I just tried a couple of little programs doing X11/OpenGL and Qt/OpenGL from lxplus displaying on my Mac, which is also a 10.15.7, and with a XQuartz 2.8.1, and it worked.

BUT, the situation is not so great, since:

  • for the X11/OpenGL one, if I run it again I have :
    X Error of failed request: BadAlloc (insufficient resources for operation)
    Major opcode of failed request: 149 (GLX)
    Minor opcode of failed request: 3 (X_GLXCreateContext)
    Serial number of failed request: 22
    Current serial number in output stream: 23
  • for the Qt/OpenGL one, if I run it again, I have:
    X Error: BadAlloc (insufficient resources for operation) 11
    Extension: 149 (Uknown extension)
    Minor opcode: 3 (Unknown request)
    Resource id: 0x600054
    Fontconfig warning: ignoring UTF-8: not a valid region tag
    X Error: BadAlloc (insufficient resources for operation) 11
    Extension: 149 (Uknown extension)
    Minor opcode: 3 (Unknown request)
    Resource id: 0x600138
    QGLTempContext: Unable to create GL context.
    X Error: BadAlloc (insufficient resources for operation) 11
    Extension: 149 (Uknown extension)
    Minor opcode: 3 (Unknown request)
    Resource id: 0x600138
    …

And if I kill XQuartz, and restart the apps, they display properly. To build the apps, I used the default compiler, X11, OpenGL and Qt of lxplus. (For Qt, the one found under /usr).

Then, it is a little bit better than what you have, but well…

(Not tried on a full Geant4 example).

Cheers. Guy

Hi John,

Yes I have indeed seen checks on xdpyinfo in other threads, but nothing looked strange to me (just rechecked) and the GLX extension is included.

Thanks for your help!
Antoine

$ xdpyinfo
...
X.Org version: 1.20.11
...
number of extensions:    22
...

Complete list for the record:
Apple-DRI, Apple-WM, BIG-REQUESTS, DAMAGE, DOUBLE-BUFFER, GLX, Generic Event Extension, MIT-SCREEN-SAVER, MIT-SHM, Present, RANDR, RENDER, SECURITY, SHAPE, SYNC, X-Resource, XC-MISC, XFIXES, XINERAMA, XInputExtension, XKEYBOARD, XVideo

Hi Guy,

Thanks for your message, that’s not ideal but at least that’s better. Sorry for the delay, I tried to go trough the visualisation part of the G4 manual first before answering.
Checking first what libraries are linked to my executable (using ldd):

  • OpenGL is from lxplus /usr/lib64
  • X is from lxplus /usr/lib64
  • Qt is from CVMFS (LGC_100), including libQt5OpenGL

I’m not sure what you mean with X11/OpenGL driver. I tried /vis/open with the following: OGL, OGLI, OGLS, OGLIX, OGLSX, OGLIXm, OGLSXm, OGLIQt, OGLSQt. For the X/Xm version no window is open (failing with G4OpenGLXViewer::G4OpenGLXViewer couldn't create context). For all the others, the issue remains the same (remote window is ok, but empty scene tree and blank view).

I continue investigating…
Thanks!
Antoine

1 Like

Hi, does anyone solve the problem? :sob: :sob: :sob:

Hello,
No, I couldn’t find a working solution. Since I’m working on lxplus, I ended up using the VNC capabilities. It requires a bit more settings (nothing to change on G4 though), but it works nicely.
Best,
Antoine

Thanks a lot! I am working on Windows now and it works.

Hello,
I have solved the issue as following:

defaults write org.xquartz.X11 enable_iglx -bool true

  • reboot

Now all is working as expected. I hope it helps,
Valentina