# slice.util.loadVolume(path) freezes after reading 5 images

**URL:** <https://discourse.slicer.org/t/slice-util-loadvolume-path-freezes-after-reading-5-images/25528>\
**Category:** Support\
**Created:** [October 3, 2022, 2:04pm UTC](https://discourse.slicer.org/t/slice-util-loadvolume-path-freezes-after-reading-5-images/25528 "2022-10-03T14:04:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![S\_Arbabi](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@S\_Arbabi](https://discourse.slicer.org/u/S_Arbabi)\
**Post date:** [October 3, 2022, 2:04pm UTC](https://discourse.slicer.org/t/slice-util-loadvolume-path-freezes-after-reading-5-images/25528/1 "2022-10-03T14:04:59Z")

</div>

I’m using loadVolume to read 6 nii files, extrat their array and save it in a dictionary.  
It works reading 5 of them but freezes on reading the 6’th one.

The 6’th file loads okay if I import it as a file in slicer manually, so the issue is not with the file.  
Also if I remove reading of first file, it can also read the 6’th one, so it seems like it has some issues with lack of memory or some resource usage.  
I checked the memory usage in task manager and it is (52% of ram ~ around 15G) on slicer.

Any ideas?
