3D slicer is keep crashing even though there is enough memory

Hello,
My computer has been keep crashing while using the 3D slicer program.
During segmentation process, the program suddenly stops then my laptop turns off.
I could not figure out why until I got this error message today.

Slicer has caught an application error, please save your work and restart.

The application has run out of memory. Increasing virtual memory size in system settings or adding more RAM may fix this issue.

If you have a repeatable sequence of steps that causes this message, please report the issue following instructions available at http://slicer.org

The message detail is:
Exception thrown in event: bad allocation

So my guess is that the program is not happy with my RAM.
However, I can’t understand why this would happen because I do have enough space on my RAM and SSD.
My dataset is about 4GB and my RAM is 64GB.
I also have 860GB available on my SSD and my CPU is 11th Gen Intel(R) Core™ i7-11800H and GPU is RTX 3070.
I also tried cropping the volume so I would have smaller file size but the program still crashed.

It seems to happen more often when I am using SkyscanReconImport to bring the files.
This did not happened when I loaded files using the ImageStacks module.
But because I can’t properly bring scale information with ImageStacks, I would like to use the SkyscanReconImport

Does anyone have any idea why this might have happened?
Any help should be appreciated.
Thank you.

Someone can probably help with this if you can provide a sample data file that reproducibly leads to a crash.

1 Like

We will need the offending dataset to figure out the problem. However, you should know that SkyscanReconImport is less optimized than the ImageStacks in terms of memory usage.

Why do you think you cannot load the same files with ImageStacks with the correct scale information? All you have to do is to open the _rec.log file from find the image spacing (if you don’t already know) and enter that information prior to importing the dataset.

1 Like

What operating system do you use?

1 Like

Thank you always for your help!
I didn’t realized I could find the image spacing from the log file.
Thanks to you now I know how!

It does seems to work better with the ImageStack, since my computer doesn’t freeze anymore. However, the program still crash and turns off unexpectedly.

This actually happens with all my datasets.
Here is one of my data sets which gave me the problem.
https://drive.google.com/drive/folders/1_1pCp2UbC3NgNotUPGHCW_d6es3unP1M?usp=sharing

If this the program’s fault, then maybe there is something wrong with my computer.

I am using Window 10!

1 Like

Thank you for your suggestion!
I’ve attached dataset to the Mr. Muratmaga’s post now!

I have tried the provided dataset with SkyScanReconImport, and have no crash on my windows 10 laptop. It has got 32GB of ram and is running the stable version of Slicer. There are a whole bunch of log files in that folder, make sure to choose the correct one output by the Nrecon, hopum10__rec.log.

I also tried with ImageStacks and load the data successfully. Dataset is also not that big. I takes a about 20 seconds with ImageStacks to load the data and about 1min with SkyScanImport on a nvme disk. So the crashes you are facing are not related to SlicerMorph or the size of the dataset.

I would make sure:

  1. You are not loading data from a network share, where access speed can be variable.
  2. You are choosing the correct log file when you are using the SkyscanReconImport

If the issues persist, we will need the exact steps of where the crash is happening.

Note. I just noticed you have a VOI folder. Just to clarify, I only tested with the top level folder, which is the untouched output from the Nrecon software. SkyscanReconImport requires you to provide the unedited output. If you do want to use the VOI folder contents in Slicer, you definitely need to use the ImageStacks.

1 Like

Thank you so much for checking on my dataset.
Without this community’s help, I probably won’t be able to continue my study.
After your response, I called the store where I bought my new laptop, and they told me that I needed to download proper drivers for my CPU and GPU!
So I did and tried using it for a week.
I think I can say that solved the problem.
My computer no longer turns off.
The program does freeze from time to time, but it is usually when I connect my iPad to use as a tablet or when I mistakenly put in a large number for the smoothing tool.
So as long as I am careful with these, I don’t have a big problem using the program.
Again, thank you for your help!
Have a great day!

1 Like