Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 465836

Summary: Memory leak in Sequence SWT bot tests : DeleteFromDiagramAction
Product: [Modeling] Sirius Reporter: Cedric Brun <cedric.brun>
Component: DiagramAssignee: Cedric Brun <cedric.brun>
Status: CLOSED FIXED QA Contact: Maxime Porhel <maxime.porhel>
Severity: normal    
Priority: P3 CC: maxime.porhel
Version: unspecifiedKeywords: triaged
Target Milestone: 3.0.0M7   
Hardware: PC   
OS: Linux   
See Also: https://git.eclipse.org/r/46795
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=9b1150aee5c2a80392c706d74cba580a63cb0308
Whiteboard:

Description Cedric Brun CLA 2015-04-29 11:40:20 EDT
Steps to reproduce :
1- launch the SWTBot sequence tests
2- wait for several hundreds of tests to pass
3- dump a snapshot of the heap memory (using yourkit or another profiling tool)

When analyzing the snapshot : we have hundreds of instances of org.eclipse.sirius.diagram.ui.tools.internal.actions.delete.DeleteFromDiagramAction
 (341 in my case)
each of those retaining  a SequenceDiagramEditPart through the "selection" field which himself retains the editingdomain which retains the resourceSet.

In my case 208Mo of heap is being retained by those actions.
Comment 1 Eclipse Genie CLA 2015-04-29 12:22:27 EDT
New Gerrit change created: https://git.eclipse.org/r/46795
Comment 2 Cedric Brun CLA 2015-04-30 12:09:11 EDT
(In reply to Eclipse Genie from comment #1)
> New Gerrit change created: https://git.eclipse.org/r/46795

By launching the tests with yourkit and this patchset and after the execution of about 60 tests,  yourkit reports only 1 instance of DeleteFromDiagramAction and the heap usage looks fairly constant.
Comment 3 Maxime Porhel CLA 2015-05-04 03:25:23 EDT
Correction proposed by Cedric has been merged.
Comment 5 Maxime Porhel CLA 2015-05-22 08:50:16 EDT
Validated on Sirius 3.0.0 RC1 (with Yourkit)
Comment 6 Pierre-Charles David CLA 2015-06-24 11:17:25 EDT
Available in Sirius 3.0.0. See https://wiki.eclipse.org/Sirius/3.0.0.