Quitting Slicer kills my entire VNC session

I’m having a problem where closing slicer causes the entire VNC session in which it’s running to quit.

My setup:

  • I’m on Computer 1 (Windows 10)
  • My vnc session is on Computer 2 (RHEL 5.11)
  • From Computer 2, I ssh to Computer 3 (RHEL 7.6) and launch Slicer (version 4.8.1).
  • I am not an administrator on Computer 2 or 3, so I can’t easily upgrade Slicer. I’ll hopefully be switching to running it in a container soon though, so that could change.

The problem behavior:

  • If a non-trivial scene is present, closing Slicer (by clicking the “x” button or typing quit() in the python interactor) crashes the VNC session
  • killing the SlicerApp-Real process from the terminal does not crash the VNC session. This is how I’ve been working around it.
  • VNC leaves the lock file /tmp/.X??-lock intact, which indicates to me that it’s exiting abnormally without cleaning up after itself.
  • Doing this with only a blank scene does not cause VNC to quit.

Is there any way I can stop this? Thanks!

Must be something in the shutdown process, perhaps OpenGL. Could be something in Slicer, VNC, or X so it’s likely hard to debug or fix.

A few ideas:

  • Slicer doesn’t need admin rights to install, so just unpackage the distribution archive and run from there.
  • The latest release and nightly builds have different OpenGL back ends than 4.8.1 so behavior might be different.
  • Manually killing SlicerApp-real sounds like an okay workaround if all else fails…

Thanks. I’ll try a newer version of Slicer ASAP and hope it fixes things. I’m really hoping to fix this because I want to run some automatic batch processing from the command line, and I’d much rather just have Slicer quit when finished than have to verify it’s finished from the outside, then find and kill the correct process.

Agreed, it’s best if the new versions fix the problem. As a patch/workaround you could call the system kill command from within your processing script to avoid whatever shutdown steps lead to the crash.

1 Like

Yeah, I thought of that shortly after I posted…it’s ugly but it would work. Thanks!