Bug 573253 - Sequence Diagram - Resize and move Constraint on an Execution
Summary: Sequence Diagram - Resize and move Constraint on an Execution
Status: UNCONFIRMED
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2021-04-29 12:11 EDT by Glenn Plouhinec CLA
Modified: 2021-05-05 09:17 EDT (History)
1 user (show)

See Also:


Attachments
Model to reproduce (11.31 KB, application/x-zip-compressed)
2021-04-29 12:11 EDT, Glenn Plouhinec CLA
no flags Details
screenshot-1.png (5.22 KB, image/png)
2021-04-29 12:13 EDT, Glenn Plouhinec CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Glenn Plouhinec CLA 2021-04-29 12:11:31 EDT
Created attachment 286271 [details]
Model to reproduce

With Sirius 6.5.0, I found a scenario where playing with a Constraint (BracketEdge) in a Sequence Diagram can lead to an Exception, and then a blocked Session until the representation is reopened. This can sometimes lead to a "black screen" in the Eclipse IDE or a state where the representation becomes invalid, but I don't have any specific scenarios to reproduce it (maybe trying to select another element in the representation/model explorer, or scrolling through the representation...). I also reproduce it in Sirius 6.4.2 with ODCE 1.4.1.

To reproduce the bug:
- Import the attached project in "sequence_constraints.zip" and open the representation "Sequence Diagram on Interaction1".
- Activate the layer "Duration Constraints"
- Using the palette, create a new Constraint on Execution "e11" (located under "m23", on the "newParticipant6:" lifeline) by clicking on the top of "e11" and then the bottom of "e11". The BracketEdge "constraint1" is created.
- Resize "constraint1" to center it on "e11" and get a straight line between its two ends.
- The expected result can be seen on screenshot-1.png. Two bendpoints are very close to each other at the bottom of "e11". When trying to move the lower bendpoint, an Exception is raised. (At this point, trying to move other bendpoints, or select another element may raise new errors).


eclipse.buildId=unknown
java.version=1.8.0_271
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=fr_FR
Framework arguments:  -pluginCustomization pluginCustomization.ini -pluginCustomization pluginCustomization.ini -pluginCustomization pluginCustomization.ini -pluginCustomization pluginCustomization.ini -pluginCustomization pluginCustomization.ini -pluginCustomization pluginCustomization.ini -pluginCustomization pluginCustomization.ini
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -pluginCustomization pluginCustomization.ini -pluginCustomization pluginCustomization.ini -pluginCustomization pluginCustomization.ini -pluginCustomization pluginCustomization.ini -pluginCustomization pluginCustomization.ini -pluginCustomization pluginCustomization.ini -data file:/C:/dev/homolo/OD-11.5/IT2/ObeoDesigner-Community/workspace/ -pluginCustomization pluginCustomization.ini

org.eclipse.ui.workbench
Error
Thu Apr 29 17:32:15 CEST 2021
Unhandled event loop exception

java.lang.ClassCastException: org.eclipse.draw2d.RelativeBendpoint cannot be cast to org.eclipse.sirius.diagram.ui.business.internal.bracket.BracketRelativeBendpoint
	at org.eclipse.sirius.diagram.ui.business.internal.bracket.BracketConnectionQuery.getPointListFromConstraintAndMove(BracketConnectionQuery.java:545)
	at org.eclipse.sirius.diagram.ui.business.internal.bracket.BracketConnectionQuery.getPointListFromConstraint(BracketConnectionQuery.java:520)
	at org.eclipse.sirius.diagram.ui.tools.internal.routers.BracketConnectionRouter.route(BracketConnectionRouter.java:89)
	at org.eclipse.draw2d.PolylineConnection$RoutingNotifier.route(PolylineConnection.java:371)
	at org.eclipse.draw2d.PolylineConnection.layout(PolylineConnection.java:176)
	at org.eclipse.sirius.diagram.ui.edit.api.part.AbstractDiagramEdgeEditPart$ViewEdgeFigure.layout(AbstractDiagramEdgeEditPart.java:715)
	at org.eclipse.draw2d.Figure.validate(Figure.java:1899)
	at org.eclipse.draw2d.Figure.validate(Figure.java:1901)
	at org.eclipse.draw2d.Figure.validate(Figure.java:1901)
	at org.eclipse.draw2d.Figure.validate(Figure.java:1901)
	at org.eclipse.draw2d.Figure.validate(Figure.java:1901)
	at org.eclipse.draw2d.FreeformViewport$FreeformViewportLayout.calculatePreferredSize(FreeformViewport.java:25)
	at org.eclipse.draw2d.AbstractLayout.getPreferredSize(AbstractLayout.java:110)
	at org.eclipse.draw2d.AbstractHintLayout.getPreferredSize(AbstractHintLayout.java:90)
	at org.eclipse.draw2d.Figure.getPreferredSize(Figure.java:810)
	at org.eclipse.draw2d.ScrollPaneSolver.solve(ScrollPaneSolver.java:82)
	at org.eclipse.draw2d.FigureCanvas.layoutViewport(FigureCanvas.java:325)
	at org.eclipse.draw2d.FigureCanvas.access$4(FigureCanvas.java:323)
	at org.eclipse.draw2d.FigureCanvas$3.notifyValidating(FigureCanvas.java:292)
	at org.eclipse.draw2d.UpdateManager.fireValidating(UpdateManager.java:143)
	at org.eclipse.sirius.diagram.ui.tools.internal.part.SiriusDiagramGraphicalViewer$ToggleUpdateManager.performValidation(SiriusDiagramGraphicalViewer.java:201)
	at org.eclipse.draw2d.DeferredUpdateManager.paint(DeferredUpdateManager.java:167)
	at org.eclipse.draw2d.LightweightSystem.paint(LightweightSystem.java:203)
	at org.eclipse.draw2d.LightweightSystem$2.handleEvent(LightweightSystem.java:110)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4213)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1037)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1046)
	at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:1525)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4797)
	at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:340)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4931)
	at org.eclipse.swt.internal.win32.OS.DefWindowProc(Native Method)
	at org.eclipse.swt.widgets.Tree.callWindowProc(Tree.java:1454)
	at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:5836)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4923)
	at org.eclipse.swt.internal.win32.OS.DefWindowProc(Native Method)
	at org.eclipse.swt.widgets.Tree.callWindowProc(Tree.java:1454)
	at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:5836)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4931)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(Native Method)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3628)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1158)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1047)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:658)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:154)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1447)



eclipse.buildId=unknown
java.version=1.8.0_271
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=fr_FR
Framework arguments:  -pluginCustomization pluginCustomization.ini -pluginCustomization pluginCustomization.ini -pluginCustomization pluginCustomization.ini -pluginCustomization pluginCustomization.ini -pluginCustomization pluginCustomization.ini -pluginCustomization pluginCustomization.ini -pluginCustomization pluginCustomization.ini
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -pluginCustomization pluginCustomization.ini -pluginCustomization pluginCustomization.ini -pluginCustomization pluginCustomization.ini -pluginCustomization pluginCustomization.ini -pluginCustomization pluginCustomization.ini -pluginCustomization pluginCustomization.ini -data file:/C:/dev/homolo/OD-11.5/IT2/ObeoDesigner-Community/workspace/ -pluginCustomization pluginCustomization.ini

org.eclipse.ui.workbench
Error
Thu Apr 29 17:32:02 CEST 2021
Unhandled event loop exception

java.lang.IllegalStateException
	at com.google.common.base.Preconditions.checkState(Preconditions.java:492)
	at org.eclipse.sirius.diagram.ui.internal.edit.parts.locator.EdgeLabelQuery.<init>(EdgeLabelQuery.java:191)
	at org.eclipse.sirius.diagram.ui.internal.edit.parts.locator.EdgeLabelLocator.computeOffSet(EdgeLabelLocator.java:125)
	at org.eclipse.sirius.diagram.ui.internal.edit.parts.locator.EdgeLabelLocator.relocate(EdgeLabelLocator.java:113)
	at org.eclipse.gmf.runtime.draw2d.ui.internal.figures.DelegatingLayout.layout(DelegatingLayout.java:44)
	at org.eclipse.draw2d.Figure.layout(Figure.java:1096)
	at org.eclipse.draw2d.PolylineConnection.layout(PolylineConnection.java:179)
	at org.eclipse.sirius.diagram.ui.edit.api.part.AbstractDiagramEdgeEditPart$ViewEdgeFigure.layout(AbstractDiagramEdgeEditPart.java:715)
	at org.eclipse.draw2d.Figure.validate(Figure.java:1899)
	at org.eclipse.draw2d.Figure.validate(Figure.java:1901)
	at org.eclipse.draw2d.Figure.validate(Figure.java:1901)
	at org.eclipse.draw2d.Figure.validate(Figure.java:1901)
	at org.eclipse.draw2d.Figure.validate(Figure.java:1901)
	at org.eclipse.draw2d.FreeformViewport$FreeformViewportLayout.calculatePreferredSize(FreeformViewport.java:25)
	at org.eclipse.draw2d.AbstractLayout.getPreferredSize(AbstractLayout.java:110)
	at org.eclipse.draw2d.AbstractHintLayout.getPreferredSize(AbstractHintLayout.java:90)
	at org.eclipse.draw2d.Figure.getPreferredSize(Figure.java:810)
	at org.eclipse.draw2d.ScrollPaneSolver.solve(ScrollPaneSolver.java:82)
	at org.eclipse.draw2d.FigureCanvas.layoutViewport(FigureCanvas.java:325)
	at org.eclipse.draw2d.FigureCanvas.access$4(FigureCanvas.java:323)
	at org.eclipse.draw2d.FigureCanvas$3.notifyValidating(FigureCanvas.java:292)
	at org.eclipse.draw2d.UpdateManager.fireValidating(UpdateManager.java:143)
	at org.eclipse.sirius.diagram.ui.tools.internal.part.SiriusDiagramGraphicalViewer$ToggleUpdateManager.performValidation(SiriusDiagramGraphicalViewer.java:201)
	at org.eclipse.draw2d.DeferredUpdateManager.performUpdate(DeferredUpdateManager.java:193)
	at org.eclipse.sirius.diagram.ui.tools.internal.part.SiriusDiagramGraphicalViewer$ToggleUpdateManager.performUpdate(SiriusDiagramGraphicalViewer.java:188)
	at org.eclipse.draw2d.DeferredUpdateManager$UpdateRequest.run(DeferredUpdateManager.java:44)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4005)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3633)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1158)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1047)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:658)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:154)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1447)
Comment 1 Glenn Plouhinec CLA 2021-04-29 12:13:14 EDT
Created attachment 286272 [details]
screenshot-1.png
Comment 2 Glenn Plouhinec CLA 2021-04-30 11:54:27 EDT
Also reproduced with Sirius 6.3.5, OD 11.3.2.