-
Notifications
You must be signed in to change notification settings - Fork 122
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
32679 fixed FindPeaks crash when the number of bins are not sufficient #37263
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please can you check whether the following warnings apply to this PR? The others I think are being fixed elsewhere
GNU C Compiler (Linux)
Clang Warnings (OSX)
The warnings have been resolved and therefore the specific changes requested have been dealt with. PR still needs reviewing in full though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice fix and thanks for adding a test. It would be good to have this check done in the validation but there is no input validation run before the exec in this algorithm and it doesn't seem worth it just for this fix. Just a minor thing then good to approve!
if (!m_dataWS->isRaggedWorkspace() && (m_dataWS->blocksize() <= static_cast<size_t>(w))) { | ||
std::stringstream errss; | ||
errss << "Block size of the workspace should be greater than:" << w; | ||
g_log.warning(errss.str()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not necessary to print a warning as well as throw an error with the same message - it prints this
Block size of the workspace should be greater than:601
Error in execution of algorithm FindPeaks:
Block size of the workspace should be greater than:601
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for noting that! Did the changes as requested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the change looks good!
Description of work
Fixed a crash on
FindPeaks
algorithm when run on histograms containing a single bin by raising an error message on this condition.Fixes #32679.
Further detail of work
To test:
FindPeaks
algorithm is run from Algorithms window on a similar workspace without crashing the workbench.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
Functional Tests
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.