Skip to content

Conversation

SilkeSchomann
Copy link
Collaborator

Description of work:
During manual testing, a few crashes were caused by entering invalid characters into the boxes for Bose and Scale for Compose as well as for Intensity on the Cut tab.

To test:

Enter a special character into the boxes mentioned above and observe no crash, but a message warning about the invalid input. In case for the the Intensity, the message differentiates between invalid entries for the start and end value.

Fixes #1087

@SilkeSchomann SilkeSchomann moved this to Ready for Review in v6.13 Release Jun 5, 2025
@github-project-automation github-project-automation bot moved this to Unassigned in DEVS Jun 5, 2025
Copy link
Member

@mducle mducle left a comment

Choose a reason for hiding this comment

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

Looks good and stops the crashes in the original issue.

But, for the cuts - I don't see the warnings (in lines 121 / 126) in the UI at all (either run from the workbench or independently). I think some other parts of the code is just swallowing the warnings... but that's no reason to stop this PR.

@github-project-automation github-project-automation bot moved this from Unassigned to Approved in DEVS Jun 5, 2025
Co-authored-by: Duc Le <duc.le@stfc.ac.uk>
@SilkeSchomann
Copy link
Collaborator Author

Looks good and stops the crashes in the original issue.

But, for the cuts - I don't see the warnings (in lines 121 / 126) in the UI at all (either run from the workbench or independently). I think some other parts of the code is just swallowing the warnings... but that's no reason to stop this PR.

The warnings are only displayed in the Message window of Mantid.

@SilkeSchomann SilkeSchomann merged commit 740ffe8 into main Jun 5, 2025
2 checks passed
@SilkeSchomann SilkeSchomann deleted the 1087_check_allowed_characters branch June 5, 2025 14:05
@github-project-automation github-project-automation bot moved this from Approved to Merged in DEVS Jun 5, 2025
@mducle
Copy link
Member

mducle commented Jun 5, 2025

The warnings are only displayed in the Message window of Mantid.

Ah right... yes I see them now - I had my logging set to Error...

I'm not sure if it's a regression but now if the boxes are empty (the default) it will give the warnings whereas previously there was no warnings (it just plots the limits of the data - now it plots the limits of the data and gives a warning if the input is either empty or just contains the characters -, +, . without any numbers.

@SilkeSchomann
Copy link
Collaborator Author

The warnings are only displayed in the Message window of Mantid.

Ah right... yes I see them now - I had my logging set to Error...

I'm not sure if it's a regression but now if the boxes are empty (the default) it will give the warnings whereas previously there was no warnings (it just plots the limits of the data - now it plots the limits of the data and gives a warning if the input is either empty or just contains the characters -, +, . without any numbers.

I've opened a new issue for displaying warnings on the MSlice GUI (#1090). I suggest we fix the Intensity box warnings as part of that.

@SilkeSchomann SilkeSchomann moved this from Ready for Review to Done in v6.13 Release Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Merged
Status: Done
Development

Successfully merging this pull request may close these issues.

Crash when entering special character
2 participants