Ticket #5130 (closed: fixed)
Crashe when a script registers an algorithm too quickly after another has finished
Reported by: | Martyn Gigg | Owned by: | Martyn Gigg |
---|---|---|---|
Priority: | critical | Milestone: | Release 2.1 |
Component: | Mantid | Keywords: | |
Cc: | doucetm@… | Blocked By: | |
Blocking: | Tester: | Owen Arnold |
Description
To reproduce:
- Open the script window in MantidPlot
- Paste in the code below
- Press Ctrl+Return many times quickly.
- Mantid will crash after a few rounds.
import mantid.api import mantid.simpleapi class TestNewAlg(mantid.api.PythonAlgorithm): def category(self): return "PythonAlgorithms" def PyInit(self): # Output workspace to put the transmission histo into self.declareProperty("Output", "", Direction.Input) def PyExec(self): output_ws_name = self.getProperty("Output").value mantid.simpleapi.CreateWorkspace(DataX=[0.1,0.2,0.3], DataY=[1,2], OutputWorkspace=output_ws_name) mantid.api.registerAlgorithm(TestNewAlg)
Change History
comment:2 Changed 8 years ago by Martyn Gigg
Protect alg tree widget updating if update in progress. Refs #5130
If two updates occur simultaneously the tree widget update crashes as the sizes are changing from 2 places.
Changeset: a20e8a6430e91af9e01f762d58ef1e4c4539d326
comment:4 Changed 8 years ago by Martyn Gigg
- Status changed from accepted to verify
- Resolution set to fixed
comment:5 Changed 8 years ago by Martyn Gigg
Ensure a script cannot execute while it is executing. Refs #5130
The menu was disabled but the actions were left enabled so the shortcuts were still alive.
Changeset: c8e68da1713947dcbadf49b11ab1de9054cd78e6
comment:6 Changed 8 years ago by Martyn Gigg
Protect alg tree widget updating if update in progress. Refs #5130
If two updates occur simultaneously the tree widget update crashes as the sizes are changing from 2 places.
Changeset: a20e8a6430e91af9e01f762d58ef1e4c4539d326
comment:7 Changed 8 years ago by Owen Arnold
- Status changed from verify to verifying
- Tester set to Owen Arnold
Ensure a script cannot execute while it is executing. Refs #5130
The menu was disabled but the actions were left enabled so the shortcuts were still alive.