# Segment editor crashes on loaded segments

**URL:** <https://discourse.slicer.org/t/segment-editor-crashes-on-loaded-segments/9294>\
**Category:** Support\
**Created:** [November 25, 2019, 2:03pm UTC](https://discourse.slicer.org/t/segment-editor-crashes-on-loaded-segments/9294 "2019-11-25T14:03:20Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![fabian](https://avatars.discourse-cdn.com/v4/letter/f/f6c823/32.png) [@fabian](https://discourse.slicer.org/u/fabian)\
**Post date:** [November 25, 2019, 2:03pm UTC](https://discourse.slicer.org/t/segment-editor-crashes-on-loaded-segments/9294/1 "2019-11-25T14:03:20Z")

</div>

Hi All!

I have a problem with the Segment Editor crashing. I load a dataset and a set of segment nodes that I have created in a previous session (.nrrd). This works well. But as soon as I conduct any operation on these segments in the Segment Editor, Slicer crashes and shuts down.

This does not occur if I save my segments as a labelmap, load that, and then extract the segments from it. However, this is quite tedious for me because I have some segments that overlap each otherwhich is obviously corrupted in the labelmap conversion.

I have tried this on three Windows machines with Slicer versions 4.8.1, 4.10.2, and 4.11. The issue is reproducible in all of them.

Would be grateful for any hints. Thanks a lot!

---

<div class="post-metadata">

**Author:** ![Sunderlandkyl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sunderlandkyl/32/79987_2.png) [@Sunderlandkyl](https://discourse.slicer.org/u/Sunderlandkyl)\
**Post date:** [November 25, 2019, 2:45pm UTC](https://discourse.slicer.org/t/segment-editor-crashes-on-loaded-segments/9294/2 "2019-11-25T14:45:19Z")

</div>

What version of Slicer was the segment .nrrd saved with?  
Could you could upload your nrrd file somewhere?

---

<div class="post-metadata">

**Author:** ![fabian](https://avatars.discourse-cdn.com/v4/letter/f/f6c823/32.png) [@fabian](https://discourse.slicer.org/u/fabian)\
**Post date:** [November 25, 2019, 3:22pm UTC](https://discourse.slicer.org/t/segment-editor-crashes-on-loaded-segments/9294/3 "2019-11-25T15:22:15Z")

</div>

Kyle! Thanks a lot - I think your question may have already solved it. The nrrd file was saved with 4.10.2. Same problem occurred over a bunch of datasets. Now I saved one with 4.11.0 - and it seems to work. Didn’t think to try and **save** them with different versions.

Thanks a lot! I’ll be back if it occurs again. 🙂

---

<div class="post-metadata">

**Author:** ![Sunderlandkyl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sunderlandkyl/32/79987_2.png) [@Sunderlandkyl](https://discourse.slicer.org/u/Sunderlandkyl)\
**Post date:** [November 25, 2019, 3:27pm UTC](https://discourse.slicer.org/t/segment-editor-crashes-on-loaded-segments/9294/4 "2019-11-25T15:27:25Z")

</div>

Slicer should not be crashing with segments from 4.10.2, so there is still something wrong.  
If you could provide a segmentation that causes Slicer to crash, it would be very helpful.

---

<div class="post-metadata">

**Author:** ![fabian](https://avatars.discourse-cdn.com/v4/letter/f/f6c823/32.png) [@fabian](https://discourse.slicer.org/u/fabian)\
**Post date:** [November 25, 2019, 3:50pm UTC](https://discourse.slicer.org/t/segment-editor-crashes-on-loaded-segments/9294/5 "2019-11-25T15:50:53Z")

</div>

Yup. Fair point! Thank you for your help!

Here’s a download link that’s valid for the next 24-ish hours. Let me know if this is in any way helpful.

edit - here’s the actual link: [https://data.stimulate.ovgu.de/d/fd98c2896f9c471f931c/](https://data.stimulate.ovgu.de/d/fd98c2896f9c471f931c/)

---

<div class="post-metadata">

**Author:** ![Sunderlandkyl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sunderlandkyl/32/79987_2.png) [@Sunderlandkyl](https://discourse.slicer.org/u/Sunderlandkyl)\
**Post date:** [November 25, 2019, 4:00pm UTC](https://discourse.slicer.org/t/segment-editor-crashes-on-loaded-segments/9294/6 "2019-11-25T16:00:09Z")

</div>

Unfortunately, I can’t seem to replicate the issue. The segmentation loads fine on 4.10.2, as well as the latest nightly.

---

<div class="post-metadata">

**Author:** ![fabian](https://avatars.discourse-cdn.com/v4/letter/f/f6c823/32.png) [@fabian](https://discourse.slicer.org/u/fabian)\
**Post date:** [November 25, 2019, 4:09pm UTC](https://discourse.slicer.org/t/segment-editor-crashes-on-loaded-segments/9294/7 "2019-11-25T16:09:01Z")

</div>

Can you edit the segments?

---

<div class="post-metadata">

**Author:** ![Sunderlandkyl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sunderlandkyl/32/79987_2.png) [@Sunderlandkyl](https://discourse.slicer.org/u/Sunderlandkyl)\
**Post date:** [November 25, 2019, 4:17pm UTC](https://discourse.slicer.org/t/segment-editor-crashes-on-loaded-segments/9294/8 "2019-11-25T16:17:03Z")

</div>

Ah sorry, I see the crash now. I’ll debug into this issue.  
Thanks for your assistance!

---

<div class="post-metadata">

**Author:** ![Sunderlandkyl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sunderlandkyl/32/79987_2.png) [@Sunderlandkyl](https://discourse.slicer.org/u/Sunderlandkyl)\
**Post date:** [November 25, 2019, 6:22pm UTC](https://discourse.slicer.org/t/segment-editor-crashes-on-loaded-segments/9294/9 "2019-11-25T18:22:41Z")

</div>

There seems to be a problem with the tumor extent. See line 22 in the NRRD file:  
`Segment1_Extent:=17 21 0 38 224 77`

This isn’t a problem that I’ve seen before with saved segments.  
How was the tumor segment set?  
Was the NRRD edited manually?

---

<div class="post-metadata">

**Author:** ![Sunderlandkyl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sunderlandkyl/32/79987_2.png) [@Sunderlandkyl](https://discourse.slicer.org/u/Sunderlandkyl)\
**Post date:** [November 25, 2019, 6:38pm UTC](https://discourse.slicer.org/t/segment-editor-crashes-on-loaded-segments/9294/10 "2019-11-25T18:38:13Z")

</div>

In any case, I’ve made a pull request that should solve this issue here: [https://github.com/Slicer/Slicer/pull/1267](https://github.com/Slicer/Slicer/pull/1267)

---

<div class="post-metadata">

**Author:** ![fabian](https://avatars.discourse-cdn.com/v4/letter/f/f6c823/32.png) [@fabian](https://discourse.slicer.org/u/fabian)\
**Post date:** [November 26, 2019, 6:44am UTC](https://discourse.slicer.org/t/segment-editor-crashes-on-loaded-segments/9294/11 "2019-11-26T06:44:52Z")

</div>

That is awesome! Yes, it is modified manually and we get rid of the tumour segment but were not aware that it’s crucial to actually delete the whole thing. Thanks so much Kyle!

---

<div class="post-metadata">

**Author:** ![Sunderlandkyl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sunderlandkyl/32/79987_2.png) [@Sunderlandkyl](https://discourse.slicer.org/u/Sunderlandkyl)\
**Post date:** [November 26, 2019, 2:24pm UTC](https://discourse.slicer.org/t/segment-editor-crashes-on-loaded-segments/9294/12 "2019-11-26T14:24:52Z")

</div>

The fix should be availiable in the latest 4.11 nightly.
