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

Bug 566344

Summary: Potentiel DiagramEventBroker listener leak for EdgeEditPart
Product: [Modeling] Sirius Reporter: Laurent Redor <laurent.redor>
Component: DiagramAssignee: Laurent Redor <laurent.redor>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: florian.barbin
Version: 6.0.0   
Target Milestone: 6.4.0   
Hardware: PC   
OS: Windows 10   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=566274
https://git.eclipse.org/r/c/sirius/org.eclipse.sirius/+/168087
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=2ba0bac52739173c96fa9cca078607c0fb21ea33
Whiteboard:

Description Laurent Redor CLA 2020-08-25 03:00:11 EDT
This problem can appears only when the models of the Session are stored on a server (Team For Capella, Obeo Designer Team Edition). So there is no real steps to reproduce here.

If the connection with the server is lost, the model is no longer accessible. In this case, when the "deactivate()" method is called for an AbstractDiagramEdgeEditPart, the org.eclipse.sirius.diagram.ui.edit.internal.part.DiagramEdgeEditPartOperation.deactivate(IDiagramEdgeEditPart) causes a "leak" for the listener added for the routing style of the edge.

Indeed, self.getNotationView().getStyle(NotationPackage.eINSTANCE.getRoutingStyle() throws an Exception (linked to bug 566274) and so the listener is not removed.

It is possible to store the routingStyle and the listener in the "activate" method to remove the listener in all conditions during the "deactivate" method.
Comment 2 Florian Barbin CLA 2020-11-17 09:04:09 EST
Verified in Team for Capella context
Comment 3 Pierre-Charles David CLA 2020-12-04 04:23:17 EST
Available in Sirius 6.4.0, see https://download.eclipse.org/sirius/updates/releases/6.4.0/ for details.