Skip to content
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

User issues ADS.clear() in script and breaks MSlice #839

Open
mducle opened this issue Oct 20, 2022 · 0 comments
Open

User issues ADS.clear() in script and breaks MSlice #839

mducle opened this issue Oct 20, 2022 · 0 comments
Assignees
Labels

Comments

@mducle
Copy link
Member

mducle commented Oct 20, 2022

Describe the bug
I'm not sure this is a bug in MSlice per-se, but because MSlice workspaces are just wrappers around hidden Mantid workspaces (stored in the ADS in order to allow the history functionality to work), users don't necessarily understand that the Mantid workspaces exist. This manifested in a recent bug where the user had ADS.clear() at the start of a script (presumably to clean up unwanted temporary workspaces). This meant, however, that all the MSlice workspaces were also deleted (but as they were hidden, the users did not realise they were there), and MSlice to stop working after the script was run.

This issue or its solution may be related to #737

Possible solutions

The most basic fix is to make a check when the workspace manager is activated to see if all the underlying ADS workspaces are still available. If not, to delete the corresponding entry in the workspace manager. Alternatively this check could be done on a per-workspace basis when an MSlice workspace is accessed (e.g. for a cut/slice) - in this case, it would be helpful to flash a message at the bottom of the gui saying the underlying Mantid workspace was deleted.

If we do check the full list of workspaces when the workspace manager is accessed (this might impose too much of a performance overhead if the user has a lot (~>50?) workspaces opened), and we see that all the workspaces have been deleted, we can issue a pop-up warning saying that we think that ADS.clear() was run which caused all the workspaces MSlice relies on to be deleted.

Finally, the most drastic solution is to go back to using non-ADS Mantid workspaces as was the design around version 1.x (?) but this would necessitate additional code (perhaps a lot of additional code) to handle the history / script generation capability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

No branches or pull requests

2 participants