Page MenuHomePhabricator

EASY: Fix problems detected by vtkDebugLeaks
Closed, ResolvedPublic

Assigned To
None
Authored By
ivo
Jun 23 2008, 7:57 PM
Referenced Files
F123: 1432_Fix_OpenCloseExtApp.patch
Apr 28 2010, 6:31 PM
F122: 1432_FirstFixes_Tutorial1to7.patch
Apr 22 2010, 5:24 PM
F121: console.png
Mar 31 2010, 2:42 PM
F120: vtkDebugLeaksPatch4.patch
Aug 7 2008, 10:01 AM
F119: vtkDebugLeaksPatch4.patch
Aug 6 2008, 5:45 PM
F118: vtkDebugLeaksPatch3.patch
Aug 4 2008, 6:21 PM
F117: vtkDebugLeaksPatch2.patch
Jul 23 2008, 7:47 PM
F116: vtkDebugLeaksPatch1.patch
Jul 17 2008, 3:13 PM

Description

Compile VTR witk VTK_DEBUG_LEAKS on.

Related Objects

StatusAssignedTask
ResolvedNone

Event Timeline

Work in progress. Additional bugs turned up during fixing (see "depends on"), delaying the commit.

First set of patches before dealing with UndoModel quirk

Second version of patch

No crashes anymore - ready to be committed. Still lots of leaks persisting.

Clean on open/close of MainApp without and with image. UndoModel destructor not yet activated.

this is a patch!

Finally committed lots of fixes with r141937.
MainApp vtk-leak free at least without and with loading an image and immediate quit afterwards.

Correction: SVN revision number is r14937.

Are there sill issues or could this bug be closed?

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 7 are vtk memory leaks free.

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 22734]
FIX (#1432): change variable order in the destructor

[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 24196]
FIX (#1432): Enable LiverSegmentationTestDriver for testing.

[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.

kislinsk merged a task: Restricted Maniphest Task.Aug 1 2016, 10:47 PM
kislinsk reopened subtask Restricted Maniphest Task as Open.Jun 27 2018, 3:03 PM
kislinsk reopened subtask Restricted Maniphest Task as Open.
kislinsk closed subtask Restricted Maniphest Task as Resolved.Jun 27 2018, 3:29 PM
kislinsk closed subtask Restricted Maniphest Task as Resolved.