Skip to content

ST6RI-941 NPE when evaluating derived properties on feature chains#772

Draft
AxelRICHARD wants to merge 1 commit into
masterfrom
ST6RI-941
Draft

ST6RI-941 NPE when evaluating derived properties on feature chains#772
AxelRICHARD wants to merge 1 commit into
masterfrom
ST6RI-941

Conversation

@AxelRICHARD

@AxelRICHARD AxelRICHARD commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Evaluating some SysML derived properties can fail with a NullPointerException when the model contains an unresolved feature chain.

The problem occurs in TypeUtil.getOwnedParametersOf(Type type). When the provided type is a Feature, the method first resolves its basic feature through FeatureUtil.getBasicFeatureOf(...). For a chained feature whose target has not been resolved yet, this call may return null. The method then unreferences that null value by calling
type.getOwnedFeature().

A concrete failing scenario is an AssignmentActionUsage containing an unresolved FeatureChaining. When its derived valueExpression property is evaluated, the computation asks TypeUtil
for owned parameters and triggers the NPE.

Expected behavior: unresolved feature chains should be treated as having no owned parameters at this stage, so derived property evaluation should return null or an empty result instead
of crashing.

This issue prevents robust handling of partially linked SysML models and can break workflows that evaluate derived properties before all feature chain references are resolved.

Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
@AxelRICHARD AxelRICHARD added this to the 2026-05 milestone Jun 17, 2026
@AxelRICHARD AxelRICHARD added the bug Something isn't working label Jun 17, 2026
@AxelRICHARD AxelRICHARD requested a review from seidewitz June 17, 2026 08:09
@AxelRICHARD AxelRICHARD marked this pull request as ready for review June 17, 2026 08:16
@seidewitz seidewitz removed this from the 2026-05 milestone Jun 17, 2026
@seidewitz seidewitz marked this pull request as draft June 17, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants