Conversation
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
AxelRICHARD
marked this pull request as ready for review
June 17, 2026 07:56
seidewitz
marked this pull request as draft
June 17, 2026 15:29
seidewitz
force-pushed
the
master
branch
2 times, most recently
from
July 2, 2026 08:31
00acc2f to
2a8e96c
Compare
Contributor
Author
|
Hello @seidewitz do you need something else for this pull request? If no, can I set it as "Ready for review"? |
AxelRICHARD
marked this pull request as ready for review
July 8, 2026 15:39
seidewitz
self-requested a review
July 22, 2026 22:35
seidewitz
reviewed
Jul 22, 2026
seidewitz
left a comment
Member
There was a problem hiding this comment.
Really, this computation needs to be revised so the adding of additional members can be eliminated. For now, though, the simple change proposed in this PR is sufficient.
seidewitz
self-requested a review
July 22, 2026 22:40
seidewitz
approved these changes
Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix a
StackOverflowErrorwhen loading aResourceSetcontainingTransitionUsageelements.Context
Loading a SysML-XMI
ResourceSetcan trigger aStackOverflowErrorwhen derived properties are evaluated onTransitionUsageelements.The recursion involves the derived transition properties and the implicit member computation performed by
TransitionUsageAdapter, especially around:TransitionUsage::sourceTransitionUsage::sourceFeature()TransitionUsage::successionObserved Behavior
The application fails with a recursive stack similar to:
SysML-Level Explanation
In SysML,
TransitionUsage::sourceis a derived property. It is computed fromsourceFeature(), which identifies the feature used as the source of the transition succession.At the same time,
TransitionUsageAdaptermay add implicit members required by transition semantics, such as:The issue is that this implicit member computation is not reentrant-safe.
Recursion Cycle
The problematic cycle is:
transition.getSource().TransitionUsage::source.transition.sourceFeature().sourceFeature()delegates toUsageUtil.getSourceFeatureOf(transition).UsageUtil.getSourceFeatureOf(...)callsNamespaceUtil.addAdditionalMembersTo(transition).TransitionUsageAdapter.addAdditionalMembers()callscomputeTransitionLinkConnectors().computeTransitionLinkConnectors()readstransition.getSource().This leads to unbounded recursion and eventually a
StackOverflowError.Typical Trigger
The issue can occur when a
TransitionUsagehas parameters, but its succession-related implicit members are not fully available at the time source is evaluated.In that state,
computeTransitionLinkConnectors()attempts to compute source-related binding connectors and readstransition.getSource(), which re-enters the same implicit member computation.Changes
Added a Boolean
isComputingTransitionLinkConnectorsthat is set to true during the computation of transition link connectors and reset to false when the computation is done. However, ifcomputeTransitionLinkConnectorsends up being recursively called, it returns without callingTransitionUsage.getSource().