eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
0 stars 0 forks source link

[UML] Infinite loop in OCLUMLUtil::getEClassifier #334

Closed eclipse-ocl-bot closed 1 month ago

eclipse-ocl-bot commented 1 month ago

| --- | --- | | Bugzilla Link | 247079 | | Status | CLOSED FIXED | | Importance | P1 critical | | Reported | Sep 11, 2008 16:10 EDT | | Modified | May 27, 2011 02:41 EDT | | Version | 1.1.0 | | Reporter | Christian Damus |

Description

OCL 1.1.0 Release

Using OCL with the UML metamodel binding, the navigation of metaclass extensions in reverse, from the base element to the stereotype application, runs into an infinite loop when the element in question is in a package that is nested within the package that has the profile application that defines the stereotype.

The problem is in the OCLUMLUtil::getEClassifier method, where there is a loop that attempts to scale the ladder of nesting packages by calling getNearestPackage() on them. This doesn't work very well at all, because asking a Package for its nearest package just returns itself. Hence the infinite loop.

eclipse-ocl-bot commented 1 month ago

By Christian Damus on Sep 11, 2008 16:41

The same bug is in the UMLEvaluationEnvironment::getEClassifier method.

eclipse-ocl-bot commented 1 month ago

By Christian Damus on Sep 12, 2008 15:46

Created attachment 112459 Fix with JUnit tes

:notepad_spiral: clipboard.txt

eclipse-ocl-bot commented 1 month ago

By Christian Damus on Sep 12, 2008 15:49

Hmmm ... Mylyn truncated my comment on the patch.

The test fails when the patch is not applied: it forks a thread on which it performs evaluation of the problem scenario, and the test fails when the main thread times out waiting for it. With the fix applied, the test passes.

eclipse-ocl-bot commented 1 month ago

By Christian Damus on Sep 12, 2008 15:56

Committed the fix to 1.2.2 and 1.3 branches.

eclipse-ocl-bot commented 1 month ago

By Christian Damus on Sep 21, 2008 18:06

Fix available in HEAD: 1.3.0.I200809211644.

eclipse-ocl-bot commented 1 month ago

By Ed Willink on May 27, 2011 02:40

Closing after over a year in verified state.

eclipse-ocl-bot commented 1 month ago

By Ed Willink on May 27, 2011 02:41

Closing after over a year in verified state.