Skip to content

Parametrics: Ensure initialization before attempting to read or copy runs#2088

Merged
brtietz merged 2 commits into
patchfrom
SAM_2013
Jul 8, 2025
Merged

Parametrics: Ensure initialization before attempting to read or copy runs#2088
brtietz merged 2 commits into
patchfrom
SAM_2013

Conversation

@berg-michael

Copy link
Copy Markdown
Collaborator

Description

#2013 reports a bug in which creating new cases from parametric runs leads to a crash if the parametric runs haven't actually been simulated.

@cpaulgilman 's steps to reproduce:

Open .sam file in parametric-test.zip.
Click Parametrics.
Right-click any row header and click Create new case*.
SAM crashes.

I note that the crash also occurs if one chooses "Show inputs". The cause of this issue, and the solution, are the same as for the original reported issue.

This bug is caused by attempting to read uninitialized data.

This PR solves this problem by checking for initialization before this read, and if uninitialized, initializes.

Fixes #2013

Corresponding branches and PRs:

This is a SAM-only change.

Unit Test Impact:

No unit test impact.

Checklist

  • requires help revision and I added that label
  • adds, removes, modifies, or deletes variables in existing compute modules
  • adds a new compute module
  • changes defaults
  • I've tagged this PR to a milestone

@brtietz brtietz requested review from cpaulgilman and sjanzou July 1, 2025 14:48

@cpaulgilman cpaulgilman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks for the fix!

@sjanzou sjanzou left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update and the details of all the bugs fixed in the pull request!

@brtietz brtietz merged commit 7b2c32b into patch Jul 8, 2025
8 checks passed
@cpaulgilman cpaulgilman added UI User interface issue that applies across performance and financial models added to release notes PR and/or issue has been added to release notes for a public release labels Jul 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

added to release notes PR and/or issue has been added to release notes for a public release UI User interface issue that applies across performance and financial models

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parametrics "create new case" causes SAM to crash

4 participants