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

Bug 507778

Summary: Stack Overflow with aql auto completion on edge's Semantic Candidate Expression
Product: [Modeling] Sirius Reporter: Frederic Madiot <frederic.madiot>
Component: DiagramAssignee: Jessy Mallet <jessy.mallet>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: julien.dupont, pierre-charles.david
Version: 4.1.0Keywords: triaged
Target Milestone: 5.0.0M7   
Hardware: PC   
OS: Windows NT   
See Also: https://git.eclipse.org/r/95451
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=7c22a9a11913c468f5606e5b10470e2b2ceb99ea
Whiteboard:
Attachments:
Description Flags
metamodel to reproduce the problem
none
Viewpoint Specification Project none

Description Frederic Madiot CLA 2016-11-18 11:33:39 EST
Created attachment 265436 [details]
metamodel to reproduce the problem

I get a Stack Overflow with autocompletion on the Semantic Candidate Expression of an Edge.
It happens when autocompleting after "aql:" while I have an (unexpected) edge in the Source Mapping.

Steps to reproduce:
-Import the archive scon16-metamodel.zip (metamodel projects) in a first eclipse
-Import the archive stack-overflow-edge.zip (viewpoint specification project) in a runtime
-Select CD_Next
-Put your cursor after "aql:" in Semantic Candidate Expression
-Enter Ctrl+Space

java.lang.StackOverflowError
	at java.util.HashMap.putVal(Unknown Source)
	at java.util.HashMap.put(Unknown Source)
	at java.util.HashSet.add(Unknown Source)
	at org.eclipse.sirius.diagram.business.internal.dialect.description.DiagramInterpretedExpressionTargetSwitch.caseAbstractNodeMapping(DiagramInterpretedExpressionTargetSwitch.java:245)
	at org.eclipse.sirius.diagram.business.internal.dialect.description.DiagramInterpretedExpressionTargetSwitch.caseAbstractNodeMapping(DiagramInterpretedExpressionTargetSwitch.java:1)
	at org.eclipse.sirius.diagram.description.util.DescriptionSwitch.doSwitch(DescriptionSwitch.java:239)
	at org.eclipse.sirius.diagram.description.util.DescriptionSwitch.doSwitch(DescriptionSwitch.java:108)
	at org.eclipse.sirius.diagram.description.util.DescriptionSwitch.doSwitch(DescriptionSwitch.java:94)
	at org.eclipse.sirius.diagram.business.internal.dialect.description.DiagramInterpretedExpressionTargetSwitch.doSwitch(DiagramInterpretedExpressionTargetSwitch.java:102)
	at org.eclipse.sirius.diagram.business.internal.dialect.description.DiagramInterpretedExpressionQuery$DiagramGlobalInterpretedTargetSwitch.doSwitch(DiagramInterpretedExpressionQuery.java:473)
	at org.eclipse.sirius.diagram.business.internal.dialect.description.DiagramInterpretedExpressionTargetSwitch.caseEdgeMapping(DiagramInterpretedExpressionTargetSwitch.java:297)
	at org.eclipse.sirius.diagram.business.internal.dialect.description.DiagramInterpretedExpressionTargetSwitch.caseEdgeMapping(DiagramInterpretedExpressionTargetSwitch.java:1)
	at org.eclipse.sirius.diagram.description.util.DescriptionSwitch.doSwitch(DescriptionSwitch.java:365)
	at org.eclipse.sirius.diagram.description.util.DescriptionSwitch.doSwitch(DescriptionSwitch.java:108)
	at org.eclipse.sirius.diagram.description.util.DescriptionSwitch.doSwitch(DescriptionSwitch.java:94)
	at org.eclipse.sirius.diagram.business.internal.dialect.description.DiagramInterpretedExpressionTargetSwitch.doSwitch(DiagramInterpretedExpressionTargetSwitch.java:102)
	at org.eclipse.sirius.diagram.business.internal.dialect.description.DiagramInterpretedExpressionQuery$DiagramGlobalInterpretedTargetSwitch.doSwitch(DiagramInterpretedExpressionQuery.java:473)
	at org.eclipse.sirius.diagram.business.internal.dialect.description.DiagramInterpretedExpressionTargetSwitch.caseEdgeMapping(DiagramInterpretedExpressionTargetSwitch.java:297)
	at org.eclipse.sirius.diagram.business.internal.dialect.description.DiagramInterpretedExpressionTargetSwitch.caseEdgeMapping(DiagramInterpretedExpressionTargetSwitch.java:1)
	at org.eclipse.sirius.diagram.description.util.DescriptionSwitch.doSwitch(DescriptionSwitch.java:365)
Comment 1 Frederic Madiot CLA 2016-11-18 11:34:54 EST
Created attachment 265437 [details]
Viewpoint Specification Project
Comment 2 Frederic Madiot CLA 2016-11-18 11:36:40 EST
If you remove CD_Next from the Source Mapping, the problem does not occur
Comment 3 Eclipse Genie CLA 2017-04-21 05:06:29 EDT
New Gerrit change created: https://git.eclipse.org/r/95451
Comment 5 Pierre-Charles David CLA 2017-04-24 05:56:26 EDT
Fixed by 7c22a9a11913c468f5606e5b10470e2b2ceb99ea.
Comment 6 Jessy Mallet CLA 2017-05-15 12:14:00 EDT
Validated with Sirius 5.0.0.201705121003
Comment 7 Pierre-Charles David CLA 2017-05-17 03:23:57 EDT
Verified by Jessy.
Comment 8 Pierre-Charles David CLA 2017-06-29 03:31:47 EDT
Available in Sirius 5.0.0, see https://wiki.eclipse.org/Sirius/5.0.0 for details.