MantisBT - VTK
View Issue Details
0009520VTK(No Category)public2009-09-10 15:572016-08-12 09:55
Luke Dodd 
Kitware Robot 
normalminoralways
closedmoved 
 
 
0009520: Memory leak in vtkUnstructuredGridBunykRayCastFunction
When using a vtkUnstructuredGridVolumeRayCastMapper to render a volume with vtkUnstructuredGridBunykRayCastFunction there is a memory leak. The leak occurs when something before the mapper in the pipeline is modified and a render requested.

vtkUnstructuredGridBunykRayCastFunction::UpdateTriangleList will be called during the render, it will allocate vtkUnstructuredGridBunykRayCastFunction::TetraTriangles - but not delete the one that had been allocated on the previous call.

I have supplied c++ source to reproduce the leak, and a patch. When the source is compiled and the process will consistently leak ram. Be careful running it for long, it will 100% the cpu and uses up all the ram it can over time.
No tags attached.
cxx BunykRayCastMemLeak.cxx (2,824) 2009-09-10 15:57
https://www.vtk.org/Bug/file/7445/BunykRayCastMemLeak.cxx
patch BunykRayCastMemLeak.patch (831) 2009-09-10 15:58
https://www.vtk.org/Bug/file/7446/BunykRayCastMemLeak.patch
Issue History
2009-09-10 15:57Luke DoddNew Issue
2009-09-10 15:57Luke DoddFile Added: BunykRayCastMemLeak.cxx
2009-09-10 15:58Luke DoddFile Added: BunykRayCastMemLeak.patch
2009-09-15 15:41François BertelStatusbacklog => tabled
2009-09-15 15:41François BertelAssigned To => François Bertel
2009-09-15 15:41François BertelNote Added: 0017545
2009-09-15 19:51Luke DoddNote Added: 0017549
2009-09-15 20:43François BertelNote Added: 0017550
2010-09-07 13:44François BertelAssigned ToFrançois Bertel =>
2011-06-16 13:11Zack GalbreathCategory => (No Category)
2016-08-12 09:55Kitware RobotNote Added: 0037098
2016-08-12 09:55Kitware RobotStatusexpired => closed
2016-08-12 09:55Kitware RobotResolutionopen => moved
2016-08-12 09:55Kitware RobotAssigned To => Kitware Robot

Notes
(0017545)
François Bertel   
2009-09-15 15:41   
Which version of VTK are you using? (a release ? CVS head ?)
(0017549)
Luke Dodd   
2009-09-15 19:51   
This is present in vtk 5.4.2. It seems to be fixed in CVS head that I just tested.

(I tested my larger program against CVS head before and it had memory issues - it didn't show up in the smaller example I uploaded. Most likely a fault somewhere else in my code clouding the issue.)

This revision seems to be the fix: http://public.kitware.com/cgi-bin/viewcvs.cgi/VolumeRendering/vtkUnstructuredGridBunykRayCastFunction.cxx?r1=1.6&r2=1.7 [^]

Sorry for any time wasted!
(0017550)
François Bertel   
2009-09-15 20:43   
I asked because I'm the person who actually applied the patch on VTK CVS head in April in rev 1.7 of vtkUnstructuredGridBunykRayCastFunction.cxx.

Don't be sorry because this is an opportunity to apply the patch to the release branch. Thanks for the report.
(0037098)
Kitware Robot   
2016-08-12 09:55   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.