Skip to content

Conversation

@psavery
Copy link
Collaborator

@psavery psavery commented Sep 3, 2025

Make a copy of the memoized median filter output so that we can be sure the array will not be modified.

This was causing a bug where, if you had one state file loaded in with the median filter applied, and you load in another state file that has the median filter applied, the memoized output was somehow modified and made the image data invalid.

Making a copy of the memoized output ensures that it won't be modified.

To ensure this problem does not happen again, HEXRD/hexrd#837 was also created.

Make a copy of the memoized median filter output so that we can be
sure the array will not be modified.

This was causing a bug where, if you had one state file loaded in
with the median filter applied, and you load in another state file
that has the median filter applied, the memoized output was somehow
modified and made the image data invalid.

Making a copy of the memoized output ensures that it won't be modified.

Signed-off-by: Patrick Avery <[email protected]>
@psavery psavery merged commit 84e3aaa into master Sep 3, 2025
6 checks passed
@psavery psavery deleted the copy-memoize-output branch September 3, 2025 19:56
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.

3 participants