Bug 525481

Summary: StackOverflowError when a mapping imports self as mapping
Product: [Modeling] Sirius Reporter: Laurent Fasani <laurent.fasani>
Component: DiagramAssignee: Project Inbox <sirius.diagram-inbox>
Status: NEW --- QA Contact:
Severity: minor    
Priority: P3 CC: julien.dupont
Version: 5.0.0Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Bug_StackOverflowError_ImportMapping none

Description Laurent Fasani CLA 2017-10-03 04:35:17 EDT
Created attachment 270792 [details]
Bug_StackOverflowError_ImportMapping

Steps to reproduce:
* Import attached project
* Create a diagram on the root semantic object
=> StackOverflowError

The reason is that the PCD_Package mapping have itself as imported reused mapping and Semantic Candidates expression is empty which corresponds to the full semantic resource contents.

We should detect the infinite loop at runtime and raise an error.
The infinite loop occurs because of the empty Semantic Candidates expression but we could just as well have the issue with NON empty Semantic Candidates expression

Nevertheless the validation of odesign with empty Semantic Candidates expression detects the possible infinite loop so this ticket has a minor severity.