Loading MRB file Leads to Creation of Temporary File that Cannot be Deleted

Hi all,

I have encountered a bug that I haven’t seen in my many years using Slicer. I was given a .mrb file from a colleague. While Slicer is able to load the MRB correctly, it also reports the error below.

Loading C:/Users/Edward/Desktop/UnionML/MRBsOriginal2024/165.mrb - vtkMRMLScene::ReadFromMRB failed: cannot remove directory 'C:/Users/Edward/AppData/Local/slicer.org/Slicer/cache/SlicerIO/__BundleLoadTemp-2024-07-13_165652_79'\n

Upon investigation, it appears that Slicer is creating temporary files in \AppData\Local\slicer.org\Slicer\cache\SlicerIO that can not be deleted. I am also unable to delete it manually using either Windows CMD or the GUI. When I attempt this, it says that Windows can no longer find the file.

Inside the __BundleLoadTempXXX folder there is a subfolder with a patient name. I am unable to open this subfolder (Windows says that the data is unavailable), and it appears to be empty. The subfolder is named XXXXXX Xxxxx. (with a period at the end). My guess is that it’s this period that is causing issues.

Even after a system restart, I was unable to delete the temporary folder. Has anyone ever encountered this before?

Thanks,
Edward

Edit: System Settings:
Windows 11 Pro
Slicer 5.6.2

Most likely some third-party antivirus or computer monitoring software keeps the folder open while trying to inspect its content and so Slicer cannot delete it. You should be able to delete the empty folders after you restart your computer. You can also just leave the folders there, as their presence does not cause any problem and don’t take up space.

You can install a utility like LockHunter that may be able to tell what application is locking the file and that can help with solving the issue.

You can also choose a different location for cache folder (in menu: Edit / Application settings / Cache / Cache location), which is not monitored or uses a more robust file system.

Hi Andras,

Thanks for the reply. I mentioned this to my colleague and they were able to give me a new .mrb without that issue. Also, after restarting my computer I was able to use CMD to get rid of the folders.