View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0016130VTK(No Category)public2016-05-18 02:222016-07-06 10:46
ReporterMarc Mörig 
Assigned ToDavid Gobbi 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version7.1.0 
Summary0016130: crashes in vtkImageSliceCollection
DescriptionCertain combinations of layer numbers/insertion order lead to inconsistencies in internal data of vtkImageSliceCollection / vtkCollection, which leads to crashes upon further usage of the collection. I have attached code that demonstrates the issue.

The problem is, that the Bottom member of vtkCollection does not get updated correctly in all cases in vtkImageSliceCollection::AddItem(...). The following patch resolves the problem.


diff --git a/Rendering/Image/vtkImageSliceCollection.cxx b/Rendering/Image/vtkImageSliceCollection.cx
index e33f93c..6018cbb 100644
--- a/Rendering/Image/vtkImageSliceCollection.cxx
+++ b/Rendering/Image/vtkImageSliceCollection.cxx
@@ -69,6 +69,7 @@ void vtkImageSliceCollection::AddItem(vtkImageSlice *a)
       elem->Next = indexElem->Next;
       indexElem->Item = a;
       indexElem->Next = elem;
+ if(this->Bottom == indexElem) this->Bottom = elem;
       this->NumberOfItems++;
       a->Register(this);
       return;

TagsNo tags attached.
ProjectTBD
Typecrash
Attached Filescpp file icon crash_vtkImageSliceCollection.cpp [^] (1,479 bytes) 2016-05-18 02:22

 Relationships

  Notes
(0035988)
Marc Mörig (reporter)
2016-05-18 02:25

I should mention that at least VTK 7.0 is affected.
(0035998)
David Gobbi (developer)
2016-05-20 13:44

https://gitlab.kitware.com/vtk/vtk/merge_requests/1513 [^]
(0036006)
David Gobbi (developer)
2016-05-24 17:06

This has been merged into master, but I'm not closing yet because it should also be merged into VTK 6.3.1.

 Issue History
Date Modified Username Field Change
2016-05-18 02:22 Marc Mörig New Issue
2016-05-18 02:22 Marc Mörig File Added: crash_vtkImageSliceCollection.cpp
2016-05-18 02:25 Marc Mörig Note Added: 0035988
2016-05-18 13:18 David Gobbi Assigned To => David Gobbi
2016-05-20 13:44 David Gobbi Note Added: 0035998
2016-05-20 13:44 David Gobbi Status backlog => gerrit review
2016-05-24 17:06 David Gobbi Note Added: 0036006
2016-07-06 10:46 David Gobbi Status gerrit review => closed
2016-07-06 10:46 David Gobbi Resolution open => fixed
2016-07-06 10:46 David Gobbi Fixed in Version => 7.1.0


Copyright © 2000 - 2018 MantisBT Team