Skip to content

Conversation

robertapplin
Copy link
Contributor

@robertapplin robertapplin commented Sep 20, 2024

Description of work

This PR fixes a crash on the Symmetrise tab of the Inelastic Data Processor interface after clearing the ADS and clicking the Preview button. The tab will now not proceed with processing if it can't find the loaded workspace in the ADS. The auto loading feature has also been disabled when validating the DataSelector on the Symmetrise tab because it was causing multiple confusing messages.

Fixes #38042

To test:

Follow the instructions on the attached issue

This does not require release notes because it is a regression since the last release

Reviewer

Please comment on the points listed below (full description).
Your comments will be used as part of the gatekeeper process, so please comment clearly on what you have checked during your review. If changes are made to the PR during the review process then your final comment will be the most important for gatekeepers. In this comment you should make it clear why any earlier review is still valid, or confirm that all requested changes have been addressed.

Code Review

  • Is the code of an acceptable quality?
  • Does the code conform to the coding standards?
  • Are the unit tests small and test the class in isolation?
  • If there is GUI work does it follow the GUI standards?
  • If there are changes in the release notes then do they describe the changes appropriately?
  • Do the release notes conform to the release notes guide?

Functional Tests

  • Do changes function as described? Add comments below that describe the tests performed?
  • Do the changes handle unexpected situations, e.g. bad input?
  • Has the relevant (user and developer) documentation been added/updated?

Does everything look good? Mark the review as Approve. A member of @mantidproject/gatekeepers will take care of it.

Gatekeeper

If you need to request changes to a PR then please add a comment and set the review status to "Request changes". This will stop the PR from showing up in the list for other gatekeepers.

@robertapplin robertapplin added Bug Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing) Indirect/Inelastic Issues and pull requests related to indirect or inelastic ISIS: Spectroscopy Issue and pull requests relating to Muons, Indirect and Inelastic at ISIS labels Sep 20, 2024
@robertapplin robertapplin added this to the Release 6.11 milestone Sep 20, 2024
@sf1919 sf1919 linked an issue Sep 20, 2024 that may be closed by this pull request
@robertapplin robertapplin force-pushed the 38042-symmetrise-preview-crash branch from 324cda6 to 74a8a67 Compare September 20, 2024 13:57
@robertapplin robertapplin marked this pull request as ready for review September 20, 2024 13:57
@adriazalvarez adriazalvarez self-assigned this Sep 21, 2024
Copy link
Contributor

@adriazalvarez adriazalvarez left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this issue.
I have tested following instructions, Mantid no longer crashes when clicking Preview button after clearing the ADS.
Otherwise, you said autoload was sending confusing messages. There other inelastic interfaces with autoload enabled (now by default) like Iqt. When you try to run the algorithm without data on the ADS, it prompts an error message, but then it loads the data.
Could we open an issue to handle better this case in inelastic interfaces having autoload enabled?

@rbauststfc rbauststfc self-assigned this Sep 25, 2024
// files were found
emit filesFound();
}
emit filesAutoLoaded();
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry if I'm not following the code and PR comments very well, but I just wanted to double check that this change is what's intended - it looks like the code here previously used to check whether auto load was enabled/requested, but now it looks like it will always perform the auto-load regardless?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for checking. I found out that the m_autoLoad option is always set to true, and so I decided to do a small bit of simplification for this class by removing the option entirely. The only place where we might not want to do auto-loading is now in the isValid function, and I have provided an option which can be passed to this function directly

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, great, thanks for explaining, that all sounds good then!

@rbauststfc rbauststfc merged commit 97000e7 into mantidproject:release-next Sep 27, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing) Indirect/Inelastic Issues and pull requests related to indirect or inelastic ISIS: Spectroscopy Issue and pull requests relating to Muons, Indirect and Inelastic at ISIS
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

Mantid crash in Symmetrise tab
3 participants