Issue 18714: RemoveStructuralFeatureValueActionActivation: Determination of position(s) of value to be removed results in inf. loop (fuml-rtf) Source: LieberLieber Software (Mrs. Tanja Mayerhofer, mayerhofer(at)big.tuwien.ac.at.) Nature: Revision Severity: Minor Summary: If a value of a structured value shall be removed and the isRemoveDuplicates flag of the RemoveStruturalFeatureValueAction is set to true or if the removeAt pin was null, the position(s) of the value to be removed are determined by calling the operation int WriteStructuralFeatureActionActivation.position(Value, ValueList, int). The problem is that the last found position is provided as startPosition for the next call of the position operation. Therefore this found position is found again and again in each call of the operation resulting in an infinite loop. Resolution: Replace the following operation call j = this.position(inputValue, featureValue.values, j); with >>> j = this.position(inputValue, featureValue.values, j+1); In line 113 (last statement in while loop of if (action.isRemoveDuplicates) clause) and 121 (last statement in while loop of else if (action.removeAt == null) clause). Resolution: Revised Text: Actions taken: May 14, 2013: received issue Discussion: End of Annotations:===== m: webmaster@omg.org Date: 14 May 2013 03:18:33 -0400 To: Subject: Issue/Bug Report ******************************************************************************* Name: Tanja Mayerhofer Employer: Vienna University of Technology mailFrom: mayerhofer@big.tuwien.ac.at Terms_Agreement: I agree Specification: Semantics of a Foundational Subset for Executable UML Models (fUML) Section: 8.6.3.2.12 RemoveStructuralFeatureValueActionActivation FormalNumber: ptc/2012-10-18 Version: v1.1 Doc_Year: 2012 Doc_Month: October Doc_Day: 18 Page: 306-309 Title: RemoveStructuralFeatureValueActionActivation: Determination of position(s) of value to be removed results in infinite loop Nature: Revision Severity: Minor CODE: 3TMw8 B1: Report Issue Remote Name: hopper.ifs.tuwien.ac.at Remote User: HTTP User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0 Time: 03:18 AM Description: If a value of a structured value shall be removed and the isRemoveDuplicates flag of the RemoveStruturalFeatureValueAction is set to true or if the removeAt pin was null, the position(s) of the value to be removed are determined by calling the operation int WriteStructuralFeatureActionActivation.position(Value, ValueList, int). The problem is that the last found position is provided as startPosition for the next call of the position operation. Therefore this found position is found again and again in each call of the operation resulting in an infinite loop. Resolution: Replace the following operation call j = this.position(inputValue, featureValue.values, j); with >>> j = this.position(inputValue, featureValue.values, j+1); In line 113 (last statement in while loop of if (action.isRemoveDuplicates) clause) and 121 (last statement in while loop of else if (action.removeAt == null) clause).