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\AbstractScriptedSubjectHierarchyPlugin.py:38) - Scripted subject hierarchy plugin registered: SegmentStatistics
Generally speaking there have been troubles with graphics drivers on remote desktops on windows so hopefully the newer versions won’t have these problems.
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:
Path=C:/ProgramData/NA-MIC/Slicer5/bin/…/bin;C:/ProgramData/NA-MIC/Slicer5/bin/…/lib/Slicer-5.2/cli-modules;C:/ProgramData/NA-MIC/Slicer5/bin/…/lib/Slicer-5.2/qt-loadable-modules;C:/ProgramData/NA-MIC/Slicer5/bin/…/lib/Slicer-5.2;C:/ProgramData/NA-MIC/Slicer5/bin/…/…/lib/Slicer-5.2/qt-loadable-modules;C:/ProgramData/NA-MIC/Slicer5/bin/…/…/lib/Slicer-5.2/qt-loadable-modules/Release;C:/ProgramData/NA-MIC/Slicer5/bin/…/lib/Python/Lib/site-packages/numpy/core;C:/ProgramData/NA-MIC/Slicer5/bin/…/lib/Python/Lib/site-packages/numpy/lib;C:/ProgramData/NA-MIC/Slicer5/…/lib/Slicer-5.2/qt-loadable-modules;C:/ProgramData/NA-MIC/Slicer5/…/lib/Slicer-5.2/qt-loadable-modules/Release;
PYTHONHOME=C:/ProgramData/NA-MIC/Slicer5/bin/…/lib/Python
PYTHONNOUSERSITE=1
PYTHONPATH=C:/ProgramData/NA-MIC/Slicer5/bin/…/lib/Slicer-5.2;C:/ProgramData/NA-MIC/Slicer5/bin/…/lib/Slicer-5.2/qt-scripted-modules;C:/ProgramData/NA-MIC/Slicer5/bin/…/lib/Slicer-5.2/qt-loadable-modules;C:/ProgramData/NA-MIC/Slicer5/bin/…/lib/vtkTeem;C:/ProgramData/NA-MIC/Slicer5/bin/…/bin/Python;C:/ProgramData/NA-MIC/Slicer5/bin/…/lib/Slicer-5.2/qt-loadable-modules/Python;C:/ProgramData/NA-MIC/Slicer5/bin/…/lib/Python/Lib;C:/ProgramData/NA-MIC/Slicer5/bin/…/lib/Python/Lib/lib-dynload;C:/ProgramData/NA-MIC/Slicer5/bin/…/lib/Python/Lib/site-packages;C:/ProgramData/NA-MIC/Slicer5/bin/…/bin/Lib/site-packages
QT_PLUGIN_PATH=C:/ProgramData/NA-MIC/Slicer5/bin/…/lib/QtPlugins
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