View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001806 | Slicer4 | Core: Scripting (Wrapping, Python) | public | 2012-03-13 14:00 | 2012-08-21 09:48 |
Reporter | fedorov | Assigned To | jcfr | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | |||||
Target Version | Slicer 4.1.0 | Fixed in Version | Slicer 4.1.0 | ||
Summary | 0001806: Memory management in Python is confusing | ||||
Description | Steve Pieper via bwh.harvard.edu to Julien, Andriy, Jean-Christophe But now that you mention it there seems to be something with the python/qt layer at work. For example, the SampleData module does not generate a leak, even if I add something like self.image = vtk.vtkImageData() to the init. This reference gets cleaned up automatically. However if I just enter the Endoscopy module and exit I get these leaks which seem to be related to the qSlicerNodeComboBox not releasing the vtkMRMLCameraNode: vtkDebugLeaks has detected LEAKS! I'll try to look into this some time, but if anyone knows what's going on I'd be glad to hear it ;) -Steve On Sat, Mar 10, 2012 at 9:43 PM, Julien Finet <julien.finet@kitware.com> wrote: See below my answers On Sat, Mar 10, 2012 at 8:23 PM, Andriy Fedorov <fedorov@bwh.harvard.edu> wrote: I looked into this issue 1) the reason tests were passing on my machine (I tested on mac and 2) I realized I do not know what are the rules regarding memory Example 1: Just adding this line to init() self.__logic = slicer.modulelogic.vtkSlicerMultiVolumeExplorerLogic() leads to the following leaks: 301: Class "vtkObserverManager" has 2 instances still around. In this module, I do not use __logic, so this is easy to fix, but I Example 2: To get rid of the remaining leaks in the generic tests, I have to self.chart = self.chartView.chart() Why is this? Does this mean I need to manually manage references to You earlier email about managing references deals with objects created The bottom line is I need some guidelines regarding memory management Interesting... Does that means that python can't instantiate VTK objects without making leaks ? I'm not enough aware of the python wrapping to give you an answer, I let the python experts answering you :-) Julien. On Thu, Mar 8, 2012 at 8:53 PM, Andriy Fedorov <fedorov@bwh.harvard.edu> wrote:
| ||||
Tags | No tags attached. | ||||
Following r19669. Endoscopy module doesn't cause any leaks. |
|
I now have error in vtkMRMLScene.cxx, and the tests just crash. Thread 0 Crashed: Dispatch queue: com.apple.main-thread |
|
here's the error: 80: ERROR: In /Users/fedorov/Slicer/Slicer4/Libs/MRML/Core/vtkMRMLScene.cxx, line 1364 |
|
Sorry, forgot to mention: this is happening when I run tests for MultiVolumeExplorer. |
|
Will send you a pull request in the coming 5/10 minutes :) |
|
Please, consider integrating the following pull request: ttps://github.com/fedorov/MultiVolumeExplorer/pull/7 Make SURE to update External_MultiVolumeExplorer.cmake in Slicer code base. |
|
Confirmed no memory leaks in the MultiVolume* generic tests. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2012-03-13 14:00 | fedorov | New Issue | |
2012-03-13 14:00 | fedorov | Status | new => assigned |
2012-03-13 14:00 | fedorov | Assigned To | => finetjul |
2012-03-13 14:00 | fedorov | Assigned To | finetjul => jcfr |
2012-03-13 14:41 | finetjul | Category | Base Code => Scripting (Wrapping, Python) |
2012-03-21 00:48 | jcfr | Description Updated | |
2012-03-21 00:51 | jcfr | Note Added: 0003898 | |
2012-04-01 18:33 | fedorov | Note Added: 0003941 | |
2012-04-01 18:34 | fedorov | Note Added: 0003942 | |
2012-04-01 18:34 | fedorov | Status | assigned => feedback |
2012-04-01 18:42 | fedorov | Note Added: 0003943 | |
2012-04-01 19:11 | jcfr | Note Added: 0003944 | |
2012-04-01 23:14 | jcfr | Note Added: 0003945 | |
2012-04-01 23:15 | jcfr | Status | feedback => resolved |
2012-04-02 07:11 | fedorov | Note Added: 0003947 | |
2012-04-02 07:11 | fedorov | Status | resolved => closed |
2012-04-02 07:11 | fedorov | Resolution | open => fixed |
2012-04-02 07:11 | fedorov | Fixed in Version | => Slicer 4.1.0 |
2012-08-21 09:48 | jcfr | Target Version | => Slicer 4.1.0 |