Issue with VTK leaks

So I am running the Slicer nightly build from August 22nd and having an issue where I cannot load mrml or mrb files. The loading bar stops at 99% and remains there for days afterwards. I’m using a desktop computer with 32GBs of RAM, an Intel i7-7700 CPU Processor and Windows 10. In addition, upon closing the Slicer application it gives warnings of a VTK leak:
image
image
image
image

I’m aware of what a memory leak is, but as I’m still very new to computing, I have no idea of what to do about it?

Could you test if the problem is reproducible with the latest nightly build?

Does the problem happen with one specific scene file or you cannot load scenes that you create from scratch?

If it does not work, can you share with us the scene that cannot be loaded? (you can upload to dropbox or onedrive and post the link)

So I have yet to see if the VTK leak occurs on the latest nightly build but I’ve tried loading both mrb and mrml files into the program and neither one is working. It still only goes to 99% and then becomes unresponsive. Attached is the link to a google drive file https://drive.google.com/file/d/0B7remrTspnWabE0xcEtfWjNYd1k/view?usp=sharing

The VTK leaks issue is still present.

Based on a quick glance, this seems to be a terminology related endless loop when loading the segmentation. I’ll take a closer look.

The problem is that we have a segment tag with this value
¦-þI@zˆIIÃöXÀ)Õ“™£“€Àœ!.ß\x12G@ïéw\x1f"[À)Õ“™£“€ÀŒE·ê\b·B@\x16\x3©\xfq±[À)Õ“™£“€ÀÐóÌ»?å@@ì½â¬P’ZÀ)Õ“™£“€À|"
and the parser hangs. @stevenagl12 do you know what this tag might be?

1 Like

I committed a fix that allows loading your scene. It will be available in tomorrow’s nightly. The tags in the segments that caused the parser to fail look like this one:

  Tags:
      TerminologyEntry: Segmentation category and type - 3D Slicer General Anatomy list~SRT^T-D0050^Tissue~SRT^T-D016E^Bone~^^~Anatomic codes - DICOM master list~^^~^^
      fN: 9
      fP: é‹H›ZF@œ_Ô±Þ XÀ³]áÆBvÀ,ÔàìéF@ÉÐß͒ZÀ³]áÆBvÀø8“`oB@ZÇýE]ZÀ³]áÆBvÀø8“`oB@SYÂKêWÀ³]áÆBvÀØwGe¬ÕC@ .°ÁXÀ)Փ™£“€À

Unfortunately storing binary data in segment tags is not supported. Do you know where these tags came from?

If you need to store binary data in a segment tag then you have to encode it as ASCII string (e.g., base64 method) before you set in the segment and decode after you get from the segment.

I have no idea where they came from. I saved the files as an mrb when I was running a segmentation. Then when I had an issue with those files loading, I extracted the mrml files from those and tried to load them, but the same issue happened.

My PI tried to look at the files on his linux system and he got:
image

The valid-looking fN and fP tag names suggest that someone/something added them deliberately. It would be interesting to know where they came from.

Loading is now fixed, but if there are any subsequent tags in the segmentation after the one containing the binary value, those will probably be lost (this is not the case in your scene).

Yes, this is the issue I fixed. Please consider this solved.

Ok, is there an easy way for me to access the segmentations I have already saved, or do you mean you corrected the issue for the future with the nightly build?

This is what I mean:

Do you use any extensions that work with segmentations and might have added these fN and fP tags?

I use a lot of extensions such as the segment editor extra effects, slicer pathology, Airway Segmenter, OpenCAD, Slicer Open CV, Markups to Models, and several others as I don’t have a programming background yet to do a lot of the stuff on my own. So mostly I rely on modules and extensions that others have made.

Great! Can you please provide a full list of installed extensions? I’d like to track down this fP tag. Thanks

Currently I have: Markupstomodel, openCAD, segmenteditorextraeffects, slicer-airwaysegmentation, sliceropencv, and slicerpathology.

1 Like

@lassoan These tags come from the SurfaceCut effect. Probably the value that is set is corrupted and this could be prevented by some check.

Thanks for the investigation I’ll take care of the Surface Cut effect fix.