Skip to content

Conversation

robertapplin
Copy link
Contributor

@robertapplin robertapplin commented Oct 21, 2024

Description of work

This PR fixes multiple crashes on the Inelastic Data Processor interface when trying to load and process invalid data. The crash was caused by not using the "Stop on failure" option in the BatchAlgorithmRunner. When an algorithm failed, it would continue with the processing without recording an error, and hence the crash would occur. We have spotted two crashes, one on the Elwin tab and another on the Moments tab. However, this crash will be present on all the tabs.

Fixes #38255

To test:

  1. Open Interfaces->Inelastic->Data Processor

  2. Go to the Moments tab

  3. Load the following data (this data was created in a weird way, and is not the usual kind of file we use for Indirect/Inelastic)
    irs26176_graphite002_red.zip

  4. Click Run

  5. It should not crash. There should be a red error in the log messages

Also try the instructions in the attached issue:

  1. *.dat files are currently not supported, so the Save Result button should be disabled after clicking Run

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 Oct 21, 2024
@robertapplin robertapplin changed the base branch from main to release-next October 21, 2024 15:23
@robertapplin robertapplin added this to the Release 6.11 milestone Oct 21, 2024
@robertapplin robertapplin added the High Priority An issue or pull request that if not addressed is severe enough to postponse a release. label Oct 21, 2024
@robertapplin robertapplin marked this pull request as ready for review October 21, 2024 15:27
@GuiMacielPereira GuiMacielPereira self-requested a review October 21, 2024 15:27
@GuiMacielPereira GuiMacielPereira self-assigned this Oct 21, 2024
Copy link
Contributor

@GuiMacielPereira GuiMacielPereira left a comment

Choose a reason for hiding this comment

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

Uhm when I follow the instructions, Mantid is crashing right after I try to open the file to be loaded. I am on Ubuntu 22.04

@GuiMacielPereira GuiMacielPereira self-requested a review October 21, 2024 16:19
Copy link
Contributor

@GuiMacielPereira GuiMacielPereira left a comment

Choose a reason for hiding this comment

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

In a stroke of genius, I previously was loading irs26176_graphite002_red.zip without unzipping, which, of course, is not the proper way to load .nxs files into the interfaces. After it was brought to my attention that I should in fact be unzipping the file (thanks @robertapplin) I can gladly say that the fix works and now all I see is an error message instead of crashing the interface. Bonus points for fixing #38255 as well 🥳

@SilkeSchomann SilkeSchomann self-assigned this Oct 21, 2024
@SilkeSchomann SilkeSchomann merged commit e1813ed into mantidproject:release-next Oct 21, 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) High Priority An issue or pull request that if not addressed is severe enough to postponse a release. 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
Status: Done
Development

Successfully merging this pull request may close these issues.

Saving .dat file in Elwin tab crashes Mantid
3 participants