# Can't save the scene and the segmentations - allocation ERROR, results undefined

**URL:** <https://discourse.slicer.org/t/cant-save-the-scene-and-the-segmentations-allocation-error-results-undefined/7782>\
**Category:** Support\
**Created:** [July 27, 2019, 7:59pm UTC](https://discourse.slicer.org/t/cant-save-the-scene-and-the-segmentations-allocation-error-results-undefined/7782 "2019-07-27T19:59:36Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![NoobForSlicer](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/noobforslicer/32/10900_2.png) [@NoobForSlicer](https://discourse.slicer.org/u/NoobForSlicer)\
**Post date:** [July 27, 2019, 7:59pm UTC](https://discourse.slicer.org/t/cant-save-the-scene-and-the-segmentations-allocation-error-results-undefined/7782/1 "2019-07-27T19:59:36Z")

</div>

![3d%20slicer](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/1/5/1564d42a6b4dbc38dd219830e23a945610b05883.jpeg)

This is the error I sadly get…

This file and Segmentations are barely 1 gb while I have 16 GB on this computer.

I wonder what could cause this?

---

<div class="post-metadata">

**Author:** ![NoobForSlicer](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/noobforslicer/32/10900_2.png) [@NoobForSlicer](https://discourse.slicer.org/u/NoobForSlicer)\
**Post date:** [July 28, 2019, 8:20am UTC](https://discourse.slicer.org/t/cant-save-the-scene-and-the-segmentations-allocation-error-results-undefined/7782/2 "2019-07-28T08:20:56Z")

</div>

hmm my page file for virtual memory is currently 20 GB allocated and I have 16 gb ram.

The Segmentations all together are: 300 KB.

I am puzzled.

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [July 28, 2019, 12:14pm UTC](https://discourse.slicer.org/t/cant-save-the-scene-and-the-segmentations-allocation-error-results-undefined/7782/3 "2019-07-28T12:14:22Z")

</div>

What is in the log? Can you please check in the menu: About / Report an error

---

<div class="post-metadata">

**Author:** ![NoobForSlicer](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/noobforslicer/32/10900_2.png) [@NoobForSlicer](https://discourse.slicer.org/u/NoobForSlicer)\
**Post date:** [July 28, 2019, 12:37pm UTC](https://discourse.slicer.org/t/cant-save-the-scene-and-the-segmentations-allocation-error-results-undefined/7782/4 "2019-07-28T12:37:23Z")

</div>

sure I will as soon as I get back home 🙂

Thanks for replying, will post as soon as I’m home

---

<div class="post-metadata">

**Author:** ![NoobForSlicer](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/noobforslicer/32/10900_2.png) [@NoobForSlicer](https://discourse.slicer.org/u/NoobForSlicer)\
**Post date:** [July 28, 2019, 1:45pm UTC](https://discourse.slicer.org/t/cant-save-the-scene-and-the-segmentations-allocation-error-results-undefined/7782/5 "2019-07-28T13:45:08Z")

</div>

Alright just attempted to repeat the same thing and slicer crashed

---

<div class="post-metadata">

**Author:** ![NoobForSlicer](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/noobforslicer/32/10900_2.png) [@NoobForSlicer](https://discourse.slicer.org/u/NoobForSlicer)\
**Post date:** [July 28, 2019, 1:45pm UTC](https://discourse.slicer.org/t/cant-save-the-scene-and-the-segmentations-allocation-error-results-undefined/7782/6 "2019-07-28T13:45:22Z")

</div>

I will try it now again

---

<div class="post-metadata">

**Author:** ![NoobForSlicer](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/noobforslicer/32/10900_2.png) [@NoobForSlicer](https://discourse.slicer.org/u/NoobForSlicer)\
**Post date:** [July 28, 2019, 2:06pm UTC](https://discourse.slicer.org/t/cant-save-the-scene-and-the-segmentations-allocation-error-results-undefined/7782/7 "2019-07-28T14:06:08Z")

</div>

Session start time …: 2019-07-28 15:45:29  
Slicer version …: 4.10.0 (revision 27501) win-amd64 - installed release  
Operating system …: Windows / Professional / (Build 9200) - 64-bit  
Memory …: 16308 MB physical, 36721 MB virtual  
CPU …: GenuineIntel , 12 cores, 12 logical processors  
VTK configuration …: OpenGL2 rendering, TBB threading  
Developer mode enabled …: no  
Prefer executable CLI …: yes  
Additional module paths …: C:/Users/User1/AppData/Roaming/NA-MIC/Extensions-27501/SegmentationWizard/lib/Slicer-4.10/qt-scripted-modules, C:/Users/User1/AppData/Roaming/NA-MIC/Extensions-27501/SegmentEditorExtraEffects/lib/Slicer-4.10/qt-scripted-modules, C:/Users/User1/AppData/Roaming/NA-MIC/Extensions-27501/MarkupsToModel/lib/Slicer-4.10/qt-loadable-modules, C:/Users/User1/AppData/Roaming/NA-MIC/Extensions-27501/IntensitySegmenter/lib/Slicer-4.10/cli-modules, C:/Users/User1/AppData/Roaming/NA-MIC/Extensions-27501/LAScarSegmenter/lib/Slicer-4.10/cli-modules, C:/Users/User1/AppData/Roaming/NA-MIC/Extensions-27501/LASegmenter/lib/Slicer-4.10/cli-modules, C:/Users/User1/AppData/Roaming/NA-MIC/Extensions-27501/IASEM/lib/Slicer-4.10/cli-modules, C:/Users/User1/AppData/Roaming/NA-MIC/Extensions-27501/IASEM/lib/Slicer-4.10/qt-scripted-modules, C:/Users/User1/AppData/Roaming/NA-MIC/Extensions-27501/VolumeClip/lib/Slicer-4.10/qt-scripted-modules, C:/Users/User1/AppData/Roaming/NA-MIC/Extensions-27501/SlicerFab/lib/Slicer-4.10/qt-scripted-modules  
Popen([‘git’, ‘version’], cwd=C:\Program Files\Slicer 4.10.0, universal\_newlines=False, shell=None)  
Popen([‘git’, ‘version’], cwd=C:\Program Files\Slicer 4.10.0, universal\_newlines=False, shell=None)  
Traceback (most recent call last):  
File “”, line 1, in   
File “C:/Users/User1/AppData/Roaming/NA-MIC/Extensions-27501/SlicerFab/lib/Slicer-4.10/qt-scripted-modules/BitmapGenerator.py”, line 21  
self.parent.contributors = [“Steve Pieper (Isomics, Inc.), Steve Keating (MIT), Ahmed Hosny (Harvard), James Weaver (Harvard)”, Andras Lasso (Queens)] # replace with “Firstname Lastname (Organization)”  
^  
SyntaxError: invalid syntax  
loadSourceAsModule - Failed to load file “C:/Users/User1/AppData/Roaming/NA-MIC/Extensions-27501/SlicerFab/lib/Slicer-4.10/qt-scripted-modules/BitmapGenerator.py” as module “BitmapGenerator” !  
Fail to instantiate module “BitmapGenerator”  
Scripted subject hierarchy plugin registered: Annotations  
Scripted subject hierarchy plugin registered: SegmentEditor  
Scripted subject hierarchy plugin registered: SegmentStatistics  
Switch to module: “Welcome”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 1/New ones new ones july 28/32344 r/Segmentation.seg.nrrd” “[0.13s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 1/New ones new ones july 28/32423 r/Segmentation.seg.nrrd” “[0.11s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 1/New ones new ones july 28/3 1231312r/Segmentation.seg.nrrd” “[0.01s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 1/New ones new ones july 28/23423 R/Segmentation.seg.nrrd” “[0.01s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 1/New ones new ones july 28/1 12312r/Segmentation\_1.seg.nrrd” “[0.01s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 1/New ones new ones july 28/5 1231231r/Segmentation.seg.nrrd” “[0.01s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 1/New ones new ones july 28/4 123131231r/Segmentation.seg.nrrd” “[0.01s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 1/New ones new ones july 28/12313123 R/Segmentation.seg.nrrd” “[0.00s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 1/New ones new ones july 28/123123 R/Segmentation.seg.nrrd” “[0.01s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 1/New ones new ones july 28/12312 R/Segmentation.seg.nrrd” “[0.01s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 1/New ones new ones july 28/1231231 R/Segmentation.seg.nrrd” “[0.01s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 1/New ones new ones july 28/312333 R/Segmentation.seg.nrrd” “[0.00s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 1/New ones new ones july 28/1112331 R/Segmentation.seg.nrrd” “[0.01s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 1/New ones new ones july 28/23213231 R/Segmentation\_1.seg.nrrd” “[0.01s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 1/New ones new ones july 28/32131333 R/Segmentation.seg.nrrd” “[0.01s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 1/New ones new ones july 28/12311 r/Segmentation\_1.seg.nrrd” “[0.15s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 1/New ones new ones july 28/131233 r/Segmentation.seg.nrrd” “[0.00s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 1/New ones new ones july 28/421239898 r/Segmentation.seg.nrrd” “[0.03s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 1/New ones new ones july 28/8987908 r/Segmentation.seg.nrrd” “[0.02s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 2/new ones july 28/890890l/Segmentation.seg.nrrd” “[0.16s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 2/new ones july 28/3 890890/Segmentation.seg.nrrd” “[0.01s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 2/new ones july 28/890890l/Segmentation.seg.nrrd” “[0.06s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 2/new ones july 28/0890890l/Segmentation.seg.nrrd” “[0.04s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 2/new ones july 28/089089 l/Segmentation.seg.nrrd” “[0.13s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 2/new ones july 28/0890890l/Segmentation.seg.nrrd” “[0.01s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 2/new ones july 28/4 890890 l/Segmentation.seg.nrrd” “[0.02s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 2/new ones july 28/4 890890l/Segmentation.seg.nrrd” “[0.01s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 2/new ones july 28/2 890890l/Segmentation.seg.nrrd” “[0.01s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 2/new ones july 28/378979l/Segmentation.seg.nrrd” “[0.01s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 2/new ones july 28/5879789l/Segmentation.seg.nrrd” “[0.01s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 2/new ones july 28/789789l/Segmentation.seg.nrrd” “[0.01s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 2/new ones july 28/789789789l/Segmentation.seg.nrrd” “[0.01s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 2/new ones july 28/9789l/Segmentation.seg.nrrd” “[0.01s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 2/new ones july 28/789789 l/Segmentation.seg.nrrd” “[0.01s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 2/new ones july 28/78978 l/Segmentation.seg.nrrd” “[0.01s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 2/new ones july 28/78978 l/Segmentation.seg.nrrd” “[0.01s]”  
“Segmentation” Reader has successfully read the file “C:/Users/User1/Downloads/Segmented/Bottle Model 2/new ones july 28/7897 L/Segmentation.seg.nrrd” “[0.00s]”  
Switch to module: “Data”  
Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_1

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_2

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_3

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_4

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_5

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_6

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_7

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_8

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_9

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_10

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_11

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_12

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_13

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_14

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_15

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_16

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_6) already exists in the target segmentation. Generate a new unique segment ID: Segment\_6\_17

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_18

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_3) already exists in the target segmentation. Generate a new unique segment ID: Segment\_3\_19

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_4) already exists in the target segmentation. Generate a new unique segment ID: Segment\_4\_20

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_5) already exists in the target segmentation. Generate a new unique segment ID: Segment\_5\_21

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_22

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_23

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_24

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_2) already exists in the target segmentation. Generate a new unique segment ID: Segment\_2\_25

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_3) already exists in the target segmentation. Generate a new unique segment ID: Segment\_3\_26

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_4) already exists in the target segmentation. Generate a new unique segment ID: Segment\_4\_27

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_5) already exists in the target segmentation. Generate a new unique segment ID: Segment\_5\_28

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_29

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_2) already exists in the target segmentation. Generate a new unique segment ID: Segment\_2\_30

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_3) already exists in the target segmentation. Generate a new unique segment ID: Segment\_3\_31

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_4) already exists in the target segmentation. Generate a new unique segment ID: Segment\_4\_32

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_33

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_2) already exists in the target segmentation. Generate a new unique segment ID: Segment\_2\_34

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_3) already exists in the target segmentation. Generate a new unique segment ID: Segment\_3\_35

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_4) already exists in the target segmentation. Generate a new unique segment ID: Segment\_4\_36

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_6) already exists in the target segmentation. Generate a new unique segment ID: Segment\_6\_37

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_38

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_39

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_40

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_41

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_42

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_43

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_44

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_45

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_46

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_47

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_48

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_49

Warning: In D:\D\S\Slicer-4100\Libs\vtkSegmentationCore\vtkSegmentation.cxx, line 1292  
vtkSegmentation (000002466EF8CB30): CopySegmentFromSegmentation: Segment with the same ID as the copied one (Segment\_1) already exists in the target segmentation. Generate a new unique segment ID: Segment\_1\_50

Switch to module: “SegmentEditor”  
Unable to allocate 1644719412 elements of size 1 bytes.

“Slicer has caught an internal error.\n\nYou may be able to continue from this point, but results are undefined.\n\nSuggested action is to save your work and restart.\n\nIf you have a repeatable sequence of steps that causes this message, please report the issue following instructions available at [http://slicer.org](http://slicer.org)\n\n\nThe message detail is:\n\nException thrown in event: bad allocation”

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [July 28, 2019, 2:43pm UTC](https://discourse.slicer.org/t/cant-save-the-scene-and-the-segmentations-allocation-error-results-undefined/7782/8 "2019-07-28T14:43:11Z")

</div>

You have run out of memory. File size on disk may be misleading if the file is compressed (labelmaps may be compressed with a ratio of thousands to one).

Can you copy-paste header of the files you loaded? Why do you load so many files? Do you store one srgment per file? How did you create the input files?

---

<div class="post-metadata">

**Author:** ![NoobForSlicer](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/noobforslicer/32/10900_2.png) [@NoobForSlicer](https://discourse.slicer.org/u/NoobForSlicer)\
**Post date:** [July 28, 2019, 4:20pm UTC](https://discourse.slicer.org/t/cant-save-the-scene-and-the-segmentations-allocation-error-results-undefined/7782/9 "2019-07-28T16:20:37Z")

</div>

> [@lassoan](#):
>
> Can you copy-paste header of the files you loaded?

- Yes I will try to figure out what a header of the file is and how to see it so I can post it here.

> [@lassoan](#):
>
> Why do you load so many files?

- My computer could not handle segmenting on a volume that was huge.
- So I cropped it and have segmented smaller parts of the design individually.

> [@lassoan](#):
>
> Do you store one srgment per file?

- Mostly I have one segmentation per seg.nrrd file.
- Sometimes in rare cases I have 4-6.

> [@lassoan](#):
>
> How did you create the input files?

- So I cropped the big volume and have segmented smaller parts of the design individually.

- Segmenting on smaller cropped nrrd files that were at most 100 mb and normally just 1-2mb was also problematic when I segment more than 2-3 things, I had to uncheck the eye thing to make them invisible and then it worked better. (this is with or without show 3d option enabled and in all three or just one (red slice) showing). Basically in simple words if I added more than 3 segments it started lagging.

- Luckily mostly I had only 1 thing to segment per 1 file so the latter was a minor issue

- This explains why I load so many files because I now would like to have the segmentations in 1 file and export them.

- I then opened Slicer and just loaded the seg.nrrd files. In Data module I simply put all the segments under one segmentation and deleted rest of the segmentations. This way it looked neat to me and easier to navigate.

- Turns out I can not export them anymore. I was little bit scared that issues could happen and if you remember I was the one that asked just 7 days ago how many segmentations can I load it and if it only depends on the memory. I was quite skeptic that everything will go smooth… Out of some noob experience I know that I never do things out of first attempt sadly and it is mostly my mistake somewhere that got away and I didn’t see it. It’s just I am puzzled here what could have been my mistake.

Could it be that cropped files still carry some information along with them from that big volume that they were cropped out? So when I add 40 cropped out files together it overloads the system because of some reason? Or could it be that Slicer does its calculations somehow in a weird way where it doesn’t care if the nrrd file I loaded is small, it only cares about the highest and the lowest and then considers the differences between them as a volume to calculate in as well… So then I have something that is 5 meters above the first segment and Slicer somehow upon exporting or saving calculates it all as one since I deleted all other segmentations and put all the semgnets under one remaining semgnetation, it can only save one seg.nrrd file. This means it can only use one header. It means that the positions will be calculated with reference to that one file and then we ended up with a huge volume? Even though that semgnetation nrrd file would have a “huge volume” generally speaking it is just 40 small segmented parts in 3D, why would it be such a problem? Or Slicer doesn’t work that way and doesn’t care if the 3d segments are small, it only cares if the NRRD file has big volume?

Hm…

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [July 28, 2019, 5:18pm UTC](https://discourse.slicer.org/t/cant-save-the-scene-and-the-segmentations-allocation-error-results-undefined/7782/10 "2019-07-28T17:18:08Z")

</div>

> Blockquote  
> Even though that semgnetation nrrd file would have a “huge volume” generally speaking it is just 40 small segmented parts in 3D, why would it be such a problem? Or Slicer doesn’t work that way and doesn’t care if the 3d segments are small, it only cares if the NRRD file has big volume?

This is a common misconception. Just because your segmentation contains a tiny fraction of the volume, it doesn’t mean that it takes only a little space in memory. As @lassoan already explained, because they are mostly 0s (or some other constant) for the empty space, they compress very well. But loaded into Slicer, they can require as much memory as the original volume. Since I don’t know what the dimensions of your master volume is, I will just make up a number and say that is 1024x1024x1024 (so about 1GB data if its 8 bit grayscale). By exporting every segmentation as a separate file, and loading them into Slicer individually, effectively you loaded a 1GB file 40 times, causing an out of memory error.

Again, I don’t know the specifics of your dataset, but most likely if you kept your segments in one file, each of which had their unique segment ids, you wouldn’t have this problem.

---

<div class="post-metadata">

**Author:** ![NoobForSlicer](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/noobforslicer/32/10900_2.png) [@NoobForSlicer](https://discourse.slicer.org/u/NoobForSlicer)\
**Post date:** [July 28, 2019, 5:38pm UTC](https://discourse.slicer.org/t/cant-save-the-scene-and-the-segmentations-allocation-error-results-undefined/7782/11 "2019-07-28T17:38:03Z")

</div>

If I have 70 small seg.nrrd files each 1-5 MB in size, so it is definitely not 1GB per file.

There are not 8 bits of grey or anything. Those are only seg.nrrd files I’ve imported. No color nor grey at all, nothing.

I have just imported seg.nrrd files with only segmentations and most often just one small segment. There are no images neither grey nor color ones.

All segments in those seg.nrrd files are small. I then just put them together in one bigger seg file. This might increase the volume indeed but then again we are talking only about seg file which is nowhere near 1 GB since it contains no color information or anything.

I really don’t understand this…

Even if what I did somehow increases the memory consumption by 1000, then from 1 MB it would be 1 GB. I’ve allocated over 40GB virtual +16 real ram memory, this means I could go 5000 more than this.

Something just doesn’t add up here…

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [July 28, 2019, 6:01pm UTC](https://discourse.slicer.org/t/cant-save-the-scene-and-the-segmentations-allocation-error-results-undefined/7782/12 "2019-07-28T18:01:21Z")

</div>

That goes to the specifics of how these segmentations are represented in the computer, and there are people who can explain this better than me. But essentially you still need to use memory to tell the software there is no color. By keeping the segments together in a single file, you get rid of the redundant memory consumption.

You have a total memory resource of 56GB, which is shared among your OS, and all other programs beside Slicer running at the time, all of which is going to affect the available memory that you can use to your specific tasks in Slicer.

---

<div class="post-metadata">

**Author:** ![NoobForSlicer](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/noobforslicer/32/10900_2.png) [@NoobForSlicer](https://discourse.slicer.org/u/NoobForSlicer)\
**Post date:** [July 28, 2019, 6:31pm UTC](https://discourse.slicer.org/t/cant-save-the-scene-and-the-segmentations-allocation-error-results-undefined/7782/13 "2019-07-28T18:31:46Z")

</div>

That is what I did, I’ve put all segments under one segmentation in Data module.

Still crashes… The error I actually posted here was when I did that.

I could allocate more memory to this but I don’t know why isn’t it showing up.  
I’ve put in 60GB in my Performance options in windows settings for virtual memory.  
But it only takes 40 GB. I don’t know why…

I have an external USB hard drive with 6 TB memory. I have clicked to use that as well and allocated 200 GB but Slicer doesn’t seem to use it. It doesn’t even show up.

I am not sure if I can purchase 128 GB or more of RAM, that would be too expensive I think.I sitll don’t know if it that would make it work.

I have exported files one by one and put them together in 3ds max, 0 problems… But why? I still can’t understand that a 70 low poly models can be so heavy and devastating… I really would like to handle this problem so I can learn from it as well.

I am still trying to get the header of those seg.nrrd files because that would give you guys insight what the hell I am actually loading and how big or small it is I guess. But I can’t since I have no clue where to find the header…

Lassoan asked a good question about it but I still didn’t figure out how to find the header in those files. Still searching, will let you guys know if I manage to find it, wish me luck

---

<div class="post-metadata">

**Author:** ![NoobForSlicer](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/noobforslicer/32/10900_2.png) [@NoobForSlicer](https://discourse.slicer.org/u/NoobForSlicer)\
**Post date:** [July 28, 2019, 6:39pm UTC](https://discourse.slicer.org/t/cant-save-the-scene-and-the-segmentations-allocation-error-results-undefined/7782/14 "2019-07-28T18:39:57Z")

</div>

I mean, I literally have seventy of 14 KB seg.nrrd files loaded in and it needs 100+ GB to save it in one scene? (it crashes whether I merge them into 1 seg.nrrd file or leave them under separate seg.nrrd files…

I must be doing something horribly wrong here…

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [July 28, 2019, 7:18pm UTC](https://discourse.slicer.org/t/cant-save-the-scene-and-the-segmentations-allocation-error-results-undefined/7782/15 "2019-07-28T19:18:24Z")

</div>

Can you share your data (70 segmentation files and your original master volume you derived the segmentations)

---

<div class="post-metadata">

**Author:** ![NoobForSlicer](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/noobforslicer/32/10900_2.png) [@NoobForSlicer](https://discourse.slicer.org/u/NoobForSlicer)\
**Post date:** [July 28, 2019, 7:38pm UTC](https://discourse.slicer.org/t/cant-save-the-scene-and-the-segmentations-allocation-error-results-undefined/7782/16 "2019-07-28T19:38:43Z")

</div>

Sadly I am not allowed to, especially since this is a public forum…

I already solved the problem manually exported them one by one.

But I am just curious because I want to learn and Slicer was amazing for me… If I figure out what Andras Lasso was saying and find how to see the header of those files I am sure i can post that since that is just metadata I guess… but that should give us valuable insights so we all understand what the heck can show 14 KB on the disk and then require 100+ GB to be saved 😃

---

<div class="post-metadata">

**Author:** ![NoobForSlicer](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/noobforslicer/32/10900_2.png) [@NoobForSlicer](https://discourse.slicer.org/u/NoobForSlicer)\
**Post date:** [July 28, 2019, 7:41pm UTC](https://discourse.slicer.org/t/cant-save-the-scene-and-the-segmentations-allocation-error-results-undefined/7782/17 "2019-07-28T19:41:30Z")

</div>

![file%20sizes](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/a/5a6ec313ce0563d44a385de538075112ad27f50b.jpeg)

Here you can see some of those were 6 KB in size 😃

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [July 28, 2019, 10:56pm UTC](https://discourse.slicer.org/t/cant-save-the-scene-and-the-segmentations-allocation-error-results-undefined/7782/18 "2019-07-28T22:56:32Z")

</div>

No, that just the file size after compression. What lassoan was asking something like this:  
[http://teem.sourceforge.net/nrrd/format.html#general.1](http://teem.sourceforge.net/nrrd/format.html#general.1)

Try importing one of your seg.nrrd files as a volume (not as a segmentation), and use the Volumes module to report it is dimensions, and data types.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [July 29, 2019, 3:37am UTC](https://discourse.slicer.org/t/cant-save-the-scene-and-the-segmentations-allocation-error-results-undefined/7782/19 "2019-07-29T03:37:46Z")

</div>

It may be surprising, but actually a 1GB labelmap may be stored on a few KB if it only contains a small structure. For editing, we sometimes need to allocate the full labelmap in memory, uncompressed, that’s why you need a lot of RAM.

Usually when you have a small structure, segmentation infrastructure only allocates memory to store that small region, but in unusual workflows, it may be possible that the full extent of the labelmap remains allocated. If you can provide sample volumes (we don’t need your actual segmentation, just similarly sized random scribbles will suffice) and a description of what you want to achieve then we can investigate more and give more specific advice.
