View Issue Details

IDProjectCategoryView StatusLast Update
0002431Slicer4Core: Base Codepublic2017-06-10 08:51
ReporterLchauvin Assigned Tojcfr  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformMacOSOSXOS Version10.8
Product VersionSlicer 4.1.0 
Target VersionSlicer 4.4.0Fixed in VersionSlicer 4.4.0 
Summary0002431: OpenIGTLinkIF leaks
Description

When opening OpenIGTLinkIF and creating a new node (vtkMRMLIGTLConnectorNode) and leaving Slicer, there is some leaks.

There is also this message:
Object::disconnect: No such slot qMRMLSceneModel::onDeviceVisibilityModified(vtkObject*)

From what I understand now, vtkMRMLIGTLConnectorNode is a child of qMRMLSceneModel.
The leaks are from the fact that vtkMRMLIGTLConnectorNode is not deleted.
I think it's not deleted because disconnect failed (for some reason) and then the object still have "connection" with others, causing the fact that destructor is not called, and leaks appeared.

The slot onDeviceVisibilityModified is existing in qMRMLIGTLIOModel, but is virtual (but implemented in the cxx file).

Here is the connection:
qvtkConnect(node, vtkMRMLIGTLConnectorNode::DeviceModifiedEvent,
this, SLOT(onDeviceVisibilityModified(vtkObject*)));

We can see this is using qvtkConnect. From the message, it seems to try using QObject::disconnect to disconnect the signal and slot.

I don't know if this is possible to use qvtkConnect to connect, and QObject::disconnect to disconnect.

Steps To Reproduce

To reproduce:

Start Slicer, open OpenIGTLinkIF module, create a new node (vtkMRMLIGTLConnectorNode), quit Slicer.

TagsToBeBackported

Activities

tokuda

tokuda

2012-09-15 11:16

developer   ~0006094

I fixed the leaks in revision 8016 in response to 0002489. It is tested on Mac OS X.

jcfr

jcfr

2012-10-26 04:25

administrator   ~0006806

Hi Tokuda,

What does this mean ? ((If an issue us resolved, please mark it resolved.))

Should this issue and also 0002489 marked as resolved ?

If no feedback is provided by the end of the day, the issue will be re-targeted for 4.3 and will remain unresolved.

Thanks for your help.

2012-10-29 06:15

 

jcfr

jcfr

2012-10-29 06:21

administrator   ~0006834

Hi OpenIGTLinkIF maintainer(s),

I worked on issue 2431 and uploaded a patch to fix the identified memory leaks.

See http://www.na-mic.org/Bug/view.php?id=2431

Would be great if, before 2.30pm EST, you could:
(1) apply the patch
(2) verify the module work as expected
(3) update External_OpenIGTLinkIF.cmake accordingly

Let me know if you have any questions,
Thanks
Jc

tokuda

tokuda

2012-10-29 06:58

developer   ~0006838

Hi Jc,

Sorry for my late response and thanks for the patch. I had fixed the issue in r8016 but didn't update the External_OpenIGTLinkIF.cmake because I did not have a chance to test it on other platforms... I will merge your fix with my fix, test and update External_OpenIGTLinkIF.cmake. Thanks!

Junichi

jcfr

jcfr

2012-10-29 07:00

administrator   ~0006839

Excellent. Thanks for the update.
Jc

tokuda

tokuda

2012-10-29 10:48

developer   ~0006868

I applied the patch and tested on my environment. After I confirm, I updated External_OpenIGTLinkIF.cmake.

jcfr

jcfr

2012-10-29 11:10

administrator   ~0006882

Last edited: 2012-10-29 11:10

Thanks for working on this.

Remarks:

As I reminder, after a developer fixed an issue, this one should be marked as RESOLVED.

Then, the reporter of the issue will CLOSE the issue if it works as expected.

That said, make sure to RESOLVE the issue. Thanks

Lchauvin

Lchauvin

2013-11-07 15:49

developer   ~0010295

I think the issue came back.
I have the same message back when leaving Slicer:

Object::disconnect: No such slot qMRMLSceneModel::onDeviceVisibilityModified(vtkObject*)

Adding:
this->qvtkDisconnectAll()
in ~qMRMLIGTLIOModel()

seems to fix the problem for me.

jcfr

jcfr

2013-11-18 11:14

administrator   ~0010334

Last edited: 2013-11-18 11:15

What is the status on this ? Which revision of Slicer ?

tokuda

tokuda

2013-11-22 15:30

developer   ~0010369

I confirmed that the issue exists in the latest OpenIGTLink IF 5659a93d490.

tokuda

tokuda

2013-11-22 15:41

developer   ~0010370

Merged:

https://github.com/openigtlink/OpenIGTLinkIF/pull/19

jcfr

jcfr

2013-11-25 10:36

administrator   ~0010380

Fixed in r22727
See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=22727

jcfr

jcfr

2014-03-06 05:25

administrator   ~0011220

Closing resolved issues that have not been updated in more than 3 months

jcfr

jcfr

2017-06-07 23:27

administrator   ~0014565

Fix committed to 2145-support-for-installing-extension-from-file branch.

Related Changesets

Slicer: 2145-support-for-installing-extension-from-file ea4fa3d4

2013-11-24 15:40:53

jcfr

Details Diff
COMP: Update OpenIGTLinkIF - Fixes 0002431 and 0003478

$ git shortlog 48384b24..b73e6a311
Andras Lasso (2):
Fixed memory corruption issues that caused random hangs when loading a scene with an active OpenIGTLink connection
Fixed crash when opening a scene containing IGTLConnectorNode

Junichi Tokuda (10):
ENH: Pass the address of the new MRML node to event handlers, when the NewDeviceEvent event is invoked. For Slicer Bug
ENH: Push outgoing messages when the connector node becomes active and OpenIGTLinkIF.pushOnConnect attribute is 1. See
ENH: Update vtkMRMLIGTLConnectorNode::PushNode() to prevent other connector nodes from sending the pushed node.
ENH: Add 'Push on Connect' checkbox in I/O configuration. Rename 'pushOnConnection' attribute to 'pushOnConnect' (value
ENH: Hide 'Push on Connect' check buttons for incoming nodes.
Merge pull request 0000016 from lassoan/master
Merge pull request 0000017 from tokjun/3478-IGTLConnectorNode-NewDeviceEvent-improvement
ENH: Fix vtkMRMLIGTLConnectorNode.cxx to merge 3501-send-all-outputs-on-connection branch.
BUG: Call this->qvtkDisconnectAll() from qMRMLIGTLIOModel() destructor to address 0002431 as suggested by Lchauvin.
Merge pull request 0000019 from tokjun/2431-no-such-slot-error-in-qMRMLIGTLIOModel

From: Junichi Tokuda <tokuda@bwh.harvard.edu>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22727 3bd1e089-480b-0410-8dfb-8563597acbee
mod - SuperBuild/External_OpenIGTLinkIF.cmake Diff File

Import 2017-06-07 23:51:09: master ea4fa3d4

2013-11-24 15:40:53

jcfr

Details Diff
COMP: Update OpenIGTLinkIF - Fixes 0002431 and 0003478

$ git shortlog 48384b24..b73e6a311
Andras Lasso (2):
Fixed memory corruption issues that caused random hangs when loading a scene with an active OpenIGTLink connection
Fixed crash when opening a scene containing IGTLConnectorNode

Junichi Tokuda (10):
ENH: Pass the address of the new MRML node to event handlers, when the NewDeviceEvent event is invoked. For Slicer Bug
ENH: Push outgoing messages when the connector node becomes active and OpenIGTLinkIF.pushOnConnect attribute is 1. See
ENH: Update vtkMRMLIGTLConnectorNode::PushNode() to prevent other connector nodes from sending the pushed node.
ENH: Add 'Push on Connect' checkbox in I/O configuration. Rename 'pushOnConnection' attribute to 'pushOnConnect' (value
ENH: Hide 'Push on Connect' check buttons for incoming nodes.
Merge pull request 0000016 from lassoan/master
Merge pull request 0000017 from tokjun/3478-IGTLConnectorNode-NewDeviceEvent-improvement
ENH: Fix vtkMRMLIGTLConnectorNode.cxx to merge 3501-send-all-outputs-on-connection branch.
BUG: Call this->qvtkDisconnectAll() from qMRMLIGTLIOModel() destructor to address 0002431 as suggested by Lchauvin.
Merge pull request 0000019 from tokjun/2431-no-such-slot-error-in-qMRMLIGTLIOModel

From: Junichi Tokuda <tokuda@bwh.harvard.edu>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22727 3bd1e089-480b-0410-8dfb-8563597acbee
mod - SuperBuild/External_OpenIGTLinkIF.cmake Diff File

Issue History

Date Modified Username Field Change
2012-08-23 11:40 Lchauvin New Issue
2012-08-23 11:40 Lchauvin Status new => assigned
2012-08-23 11:40 Lchauvin Assigned To => tokuda
2012-09-15 11:16 tokuda Note Added: 0006094
2012-10-26 04:25 jcfr Note Added: 0006806
2012-10-29 06:15 jcfr File Added: 2431-fix-openigtlinkif-leaks
2012-10-29 06:21 jcfr Note Added: 0006834
2012-10-29 06:21 jcfr Status assigned => feedback
2012-10-29 06:58 tokuda Note Added: 0006838
2012-10-29 07:00 jcfr Note Added: 0006839
2012-10-29 10:48 tokuda Note Added: 0006868
2012-10-29 11:10 jcfr Note Added: 0006882
2012-10-29 11:10 jcfr Note Edited: 0006882
2012-10-29 15:31 jcfr Status feedback => resolved
2012-10-29 15:31 jcfr Fixed in Version => Slicer 4.2.0 - coming release
2012-10-29 15:31 jcfr Resolution open => fixed
2013-02-19 14:49 Lchauvin Status resolved => closed
2013-11-07 15:49 Lchauvin Note Added: 0010295
2013-11-07 15:49 Lchauvin Status closed => feedback
2013-11-07 15:49 Lchauvin Resolution fixed => reopened
2013-11-18 11:14 jcfr Note Added: 0010334
2013-11-18 11:15 jcfr Note Edited: 0010334
2013-11-22 15:30 tokuda Note Added: 0010369
2013-11-22 15:41 tokuda Note Added: 0010370
2013-11-25 10:36 jcfr Note Added: 0010380
2013-11-25 10:36 jcfr Fixed in Version Slicer 4.2.0 => Slicer 4.3.2
2013-11-25 10:36 jcfr Target Version Slicer 4.2.0 => Slicer 4.3.2
2013-11-25 10:37 jcfr Tag Attached: ToBeBackported
2013-11-25 10:38 jcfr Status feedback => resolved
2013-11-25 10:38 jcfr Resolution reopened => fixed
2014-03-06 05:25 jcfr Note Added: 0011220
2014-03-06 05:28 jcfr Status resolved => closed
2014-03-06 10:16 nicole Target Version Slicer 4.3.2 => Slicer 4.4.0
2014-03-06 10:17 nicole Fixed in Version Slicer 4.3.2 => Slicer 4.4.0
2017-06-07 23:27 jcfr Changeset attached => Slicer 2145-support-for-installing-extension-from-file ea4fa3d4
2017-06-07 23:27 jcfr Note Added: 0014565
2017-06-07 23:27 jcfr Assigned To tokuda => jcfr
2017-06-10 08:51 jcfr Changeset attached => Slicer master ea4fa3d4