Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #2994, non-existent path causes segmentation fault when saving plot #3038

Merged
merged 3 commits into from
Jun 18, 2024

Conversation

pitkajuh
Copy link
Contributor

Description

As stated in the bug report, a segmentation fault happens when trying to create a plot with non-existent path in plot.xml. This pull request fixes the issue.

Fixes #2994

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 15) on any C++ source files (if applicable)
  • I have followed the style guidelines for Python source files (if applicable)
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

@pitkajuh pitkajuh requested a review from pshriwise as a code owner June 16, 2024 15:29
Copy link
Contributor

@pshriwise pshriwise left a comment

Choose a reason for hiding this comment

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

A clear improvement. Thanks @pitkajuh! Really small suggestion here but then I think it's good to go.

src/plot.cpp Outdated Show resolved Hide resolved
@pshriwise
Copy link
Contributor

@pitkajuh I've just added a test to ensure this works as expected. Let me know if that looks alright to you.

@paulromano paulromano added this to the v0.15.0 milestone Jun 17, 2024
Co-authored-by: Patrick Shriwise <[email protected]>
@paulromano paulromano enabled auto-merge (squash) June 17, 2024 23:20
@paulromano paulromano merged commit e33e66a into openmc-dev:develop Jun 18, 2024
16 checks passed
church89 pushed a commit to openmsr/openmc that referenced this pull request Jul 18, 2024
… saving plot (openmc-dev#3038)

Co-authored-by: Patrick Shriwise <[email protected]>
Co-authored-by: Paul Romano <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error message when plot filename path does not exist
3 participants