Compile VTR witk VTK_DEBUG_LEAKS on.
Description
Status | Assigned | Task | ||
---|---|---|---|---|
Restricted Maniphest Task | ||||
Resolved | None | T1432 EASY: Fix problems detected by vtkDebugLeaks | ||
Restricted Maniphest Task | ||||
Restricted Maniphest Task |
Event Timeline
Work in progress. Additional bugs turned up during fixing (see "depends on"), delaying the commit.
Clean on open/close of MainApp without and with image. UndoModel destructor not yet activated.
Finally committed lots of fixes with r141937.
MainApp vtk-leak free at least without and with loading an image and immediate quit afterwards.
Especially: are there still unsolved leaks that should be fixed for release 0.12 until end of April?
Someone should test this again: Compile a VTK with VTK_DEBUG_LEAKS set to ON and MITK using this VTK. Run the ExtApp and look at the messages on the console after exiting it.
I compile a VTK with VTK_DEBUG_LEAKS set to ON
and MITK using this VTK. Above I attached a screenshot of the console after closing the application.
Additionally I started/closed Step1 of the MITK tutorial. The following error message occurs:
"vktDebugLeaks has detected LEAKS!
Class 'VtkCommand or Subclass' has 3 instances still around."
To start with small pieces of code, we searched for vtk memory leaks in the tutorial steps 1 to 8.
We found two big cycle-memory-leaks in mitkGeometry2DDataMapper2D and mitkGeometry2DVtkMapper3D, based on SmartPointer to the Datastorage. We solved it, by using weakpointers.
Now, tutorial steps 1 to 7 are clean of vtk memory leaks.
With this patch the tutorial steps 1 to 8, open/close ExtApp, open/load image/close ExtApp are free of vtk memory leaks.
[SVN revision 22623]
FIX (#1432): remove vtk Debug leaks for tutorial steps 1 to 8, open/close ExtApp, open/loadImage/close ExtApp.
[SVN revision 22627]
COMP (#1432): reverted wrong delete of object under smart pointer
[SVN revision 22628]
COMP (#1432): reverted wrong delete of object under smart pointer
In addition I created a new external Dartclient, which use VTK with VTK_DEBUG_LEAKS set to on.
Currently, 18 tests fails due to Debug leaks.
[SVN revision 22722]
FIX (#1432): Resolved vtk Debug leaks of the tests concerning open source MITK. Still three tests are failing (mitkFactoryRegistrationTest, mitkManualSegmentationToSurfaceFilterTest and mitkPointSetFileIOTest).
[SVN revision 22724]
COMP (#1432): remove changes in mitkManualSegmentationToSurfaceFilterTest
[SVN revision 22952]
FIX (#1432): removed vtkDebugLeak by deleting mitkPointSetFileIOTestClass correctly
[SVN revision 22954]
FIX (#1432): avoid vtkDebugLeaks by using vtkSmartPointer for the variables m_OdfTransform, m_OdfVals and m_OdfSource.
[SVN revision 23107]
FIX (#1432): removed vtkDebugLeak in mitkRenderingManagerTest by deleting vtkRenWin correctly and call RemoveRenderWindow at the end of the test. Furthermore delete vtk variables in RenderingManager::AddRenderWindow instead of in RemoveRenderWindow.
vtkDebug leaks are solved in all tutorial steps, public tests and all applications (opening, loading an image (or not), closing).
I will close this bug =)
[SVN revision 24195]
FIX (#1432): Removed vtkDebugLeaks in MitkAnisotropicRegistration- and LiverSegmentationTestDriver. Now all tests whether in intern or extern are running fine.
[SVN revision 24266]
FIX (#1432): Revert changes. m_PolyDataSeries is deleted in mitkSurface.
[SVN revision 24299]
COMP (#1432): Due to the last fix (revision 24266) a vtkDebugLeak occurs in the LiverSegmentationTestDriver. I disabled the test again and I will look at it next bugSquashing Party.
[SVN revision 24575]
FIX (#1432): solved LAST vtkDebugLeak and enabled LiverSegmentationTestDriver again.