Slicer-5.2.2 not starting on Windows Server 2016 using Microsoft Application Virtualization (appv)

Operating system: win10, windows server 2016
Slicer version: 5.2.2
Expected behavior: starting
Actual behavior: not starting

Hi all
we are distributing software through Microsoft Application Virtualization (appv). Previous versions (latest was 4.10) were no problem, but version 5.2.2 does not start.

There are no error messages, no error dialogs, and no errors in the log files. The splash dialog appears, closes, appears again, and then the program just closes.

Interestingly, that happens also on a machine where 3dslicer 5.2.2 is installed locally, but started from within a so called virtual bubble.

Any idea what to look for?

the last line of the log file is:
[DEBUG][Python] 09.06.2023 13:24:02 [Python] (C:\ProgramData\NA-MIC\Slicer 5.2.2\lib\Slicer-5.2\qt-scripted-modules\SubjectHierarchyPlugins\ - Scripted subject hierarchy plugin registered: SegmentStatistics

thanks in advance for any suggestion!

Please provide the full log.

I don’t know anything about appv so I searched for it and the first hit had this message, so maybe you can try the suggested replacement?

Generally speaking there have been troubles with graphics drivers on remote desktops on windows so hopefully the newer versions won’t have these problems.

[DEBUG][Qt] 12.06.2023 09:48:50 (unknown:0) - Session start time …: 2023-06-12 09:48:50
[DEBUG][Qt] 12.06.2023 09:48:50 (unknown:0) - Slicer version …: 5.2.2 (revision 31382 / fb46bd1) win-amd64 - installed release
[DEBUG][Qt] 12.06.2023 09:48:50 (unknown:0) - Operating system …: Windows / Professional / (Build 19044, Code Page 65001) - 64-bit
[DEBUG][Qt] 12.06.2023 09:48:50 (unknown:0) - Memory …: 4095 MB physical, 5443 MB virtual
[DEBUG][Qt] 12.06.2023 09:48:50 (unknown:0) - CPU …: GenuineIntel , 4 cores, 4 logical processors
[DEBUG][Qt] 12.06.2023 09:48:50 (unknown:0) - VTK configuration …: OpenGL2 rendering, TBB threading
[DEBUG][Qt] 12.06.2023 09:48:50 (unknown:0) - Qt configuration …: version 5.15.2, with SSL, requested OpenGL 3.2 (compatibility profile)
[DEBUG][Qt] 12.06.2023 09:48:50 (unknown:0) - Internationalization …: disabled, language=
[DEBUG][Qt] 12.06.2023 09:48:50 (unknown:0) - Developer mode …: disabled
[DEBUG][Qt] 12.06.2023 09:48:50 (unknown:0) - Application path …: C:/Users/test/Desktop/Slicer/bin
[DEBUG][Qt] 12.06.2023 09:48:50 (unknown:0) - Additional module paths …: (none)
[DEBUG][Python] 12.06.2023 09:48:59 [Python] (C:\Users\test\Desktop\Slicer\lib\Slicer-5.2\qt-scripted-modules\SubjectHierarchyPlugins\ - Scripted subject hierarchy plugin registered: Annotations
[DEBUG][Python] 12.06.2023 09:49:01 [Python] (C:\Users\test\Desktop\Slicer\lib\Slicer-5.2\qt-scripted-modules\SubjectHierarchyPlugins\ - Scripted subject hierarchy plugin registered: SegmentEditor
[DEBUG][Python] 12.06.2023 09:49:01 [Python] (C:\Users\test\Desktop\Slicer\lib\Slicer-5.2\qt-scripted-modules\SubjectHierarchyPlugins\ - Scripted subject hierarchy plugin registered: SegmentStatistics

we could create a workaround.
the reason Slicer.exe did not start correctly are all the environment variables that are set by the slicer.exe, but they are not valid inside an virtual appv package.
The workaround is to set the variables correctly first, and then start the slicerapp-real.exe


Many people struggle with this odd behavior of App-V on this old Windows Server version and there does not seem to be a clear solution, only workarounds like you described. Probably the issue is fixed in more recent Windows Server versions.

Dear Andras,
thanks for your reply. However: this behavious also occurs on windows 11 machines. It is clearly not a question of OS version. Rather, the paths inside the virtual bubble of an appv package are completely different than on a “real” installation.


Thanks for the clarification. Did I understand correctly that you tried to start the application by running Slicer.exe and it failed because the environment variables that Slicer.exe set were not passed on to SlicerApp-real.exe (SlicerApp-real.exe did not inherit its environment from the process or launched it but got some default environment)?

Dear Andras,
let’s say I did a “real” install on a win10 machine, installing as admin to c:\programdata\slicer5. If I start a cmd.exe after install, no new variables are set. But variables were created. you can see them by:
start slicer
click add data button
click “choose file…”
in the file name field, enter c:\windows\system32\cmd.*
click Open button. Scroll down, rightclick cmd.exe and select Open in the context menu.
in the cmd window, enter set to see these variables set:

I do not know how slicer.exe evaluates all these paths. the fact of having things like bin/…/lib is also quite interesting, but no problem…

Inside an appv package, all these paths will not exist, i.e. the paths are different