Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 343123 - [General] Infinite loop when classifier behavior of an element refer to itself
Summary: [General] Infinite loop when classifier behavior of an element refer to itself
Status: RESOLVED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Others (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 blocker (vote)
Target Milestone: ---   Edit
Assignee: Ansgar Radermacher CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-18 05:52 EDT by Fabien Gautreault CLA
Modified: 2013-06-11 07:29 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabien Gautreault CLA 2011-04-18 05:52:31 EDT
Build Identifier: 20100617-1415

[ActivityDiagram] When the classifier behavior of an activity0 is edited to refear to itself, it create an infinite loop, papyrus freezes, the model is corrupted and cannot be open anymore.

Reproducible: Always

Steps to Reproduce:
1.Create an activity0
2.Edit the classifier behavior the refer to activity0
Comment 1 Sébastien Gérard CLA 2013-04-01 07:07:00 EDT
Still reproducible. Bug is valid for any behaviors (e.g., statemachine, interaction or activity) that refers itself as classfier behavior.
Comment 2 Ansgar Radermacher CLA 2013-04-01 18:09:24 EDT
According to the UML specification, a classifier behavior must subset an owned behavior. Thus, Papyrus should not allow to set the classifier behavior of an activity, state-machine or interaction to itself.

Since eCore enforces the UML constraint, the result of setting the classifier behavior of an element to itself is an element that owns itself (eContainer = element). This causes an endless loop in method getViewToPersist of class DiagramEventBroker (gmf.runtime.core.listener).  As said before, the endless loop is only the symptom: Papyrus needs to filter the list of elements that are candidates for the classifier behavior appropriately.
Comment 3 Ansgar Radermacher CLA 2013-04-02 09:24:56 EDT
Camille, can you please have a look at this error. A solution needs filter the list of available behaviors, when the user edits the classifier-behavior via the Properties->Advanced tab.
Comment 4 Ansgar Radermacher CLA 2013-06-11 07:29:25 EDT
This bug can not be reproduced any more, since the selection dialog (in class UMLPropertySource) does not allow to select the classifier itself.

Beside of that, the selection dialog was rather useless, since it lists all behaviors of the model instead of only owned behaviors. This has been fixed in r11411. Now only owned behaviors are available via the advanced tab. Thus, I'll close the bug, yet it needs to be clarified whether filtering needs to be done for other attributes, not only classifierBehavior.