Bug 526884

Summary: Depth-first traversal algorithm bring stack overflow during layout process for large-scale diagram
Product: [Modeling] Sirius Reporter: mind calm <chismxna>
Component: DiagramAssignee: Project Inbox <sirius.diagram-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: pierre-charles.david, steve.monnier
Version: unspecifiedKeywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
the model is f20k.family none

Description mind calm CLA 2017-11-06 07:55:31 EST
Created attachment 271343 [details]
the model is f20k.family

Hi,

When i test a large-scale model, i was trying to create the diagram and open it, i met the problem as in attachment.
Comment 1 mind calm CLA 2017-11-06 19:55:52 EST
Caused by: java.lang.StackOverflowError
	at org.eclipse.sirius.diagram.ui.tools.internal.layout.AutoSizeAndRegionAwareGraphLayout.recursiveHandleVirtualNode(AutoSizeAndRegionAwareGraphLayout.java:307)
	at org.eclipse.sirius.diagram.ui.tools.internal.layout.AutoSizeAndRegionAwareGraphLayout.recursiveHandleVirtualNode(AutoSizeAndRegionAwareGraphLayout.java:347)
	at org.eclipse.sirius.diagram.ui.tools.internal.layout.AutoSizeAndRegionAwareGraphLayout.recursiveHandleVirtualNode(AutoSizeAndRegionAwareGraphLayout.java:352)
	at org.eclipse.sirius.diagram.ui.tools.internal.layout.AutoSizeAndRegionAwareGraphLayout.recursiveHandleVirtualNode(AutoSizeAndRegionAwareGraphLayout.java:347)
	at org.eclipse.sirius.diagram.ui.tools.internal.layout.AutoSizeAndRegionAwareGraphLayout.recursiveHandleVirtualNode(AutoSizeAndRegionAwareGraphLayout.java:352)
	at org.eclipse.sirius.diagram.ui.tools.internal.layout.AutoSizeAndRegionAwareGraphLayout.recursiveHandleVirtualNode(AutoSizeAndRegionAwareGraphLayout.java:347)
	at org.eclipse.sirius.diagram.ui.tools.internal.layout.AutoSizeAndRegionAwareGraphLayout.recursiveHandleVirtualNode(AutoSizeAndRegionAwareGraphLayout.java:352)
******************************************************************************
Comment 2 Pierre-Charles David CLA 2017-11-07 05:23:59 EST
See also https://www.eclipse.org/forums/index.php/mv/msg/1088968/1775840/ for the original discussion.
Comment 3 mind calm CLA 2017-11-07 20:28:26 EST
Hi, Pierre-Charles

yes, you told me "the code originally lifted from GMF Runtime (CompositeDirectedGraphLayout) to add some customizations", and you asked me to open a bugzilla for this with more details about "large-scale model".
Comment 4 Pierre-Charles David CLA 2017-11-08 02:57:27 EST
I remember, I'm just adding the link so that when we tackle this issue we can easily get the full context, including the exchange with Ed Willink.