Ticket #6340 (closed: fixed)
Possible crash when selecting algorithm that has a 'validateInputs' method.
Reported by: | Russell Taylor | Owned by: | Russell Taylor |
---|---|---|---|
Priority: | major | Milestone: | Release 2.4 |
Component: | Mantid | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Martyn Gigg |
Description
This crash was observed on RHEL6 with the SumEventsByLogValue algorithm. It can be generated as follows:
- Somehow create a Workspace2D
- Select it in the workspace browser window
- Try to bring up the SumEventsByLogValue algorithm dialog (this is an algorithm that needs an EventWorkspace as input)
- Boom!
The problem is in the validateInputs() method, which ends up getting called when the dialog is brought up, even though the individual property validation on the InputWorkspace will have failed for the selected Workspace2D. So you then end up trying to use a null pointer.
Change History
comment:2 Changed 8 years ago by Russell Taylor
Re #6340. Only call validateInputs() if individual properties are OK.
A crash was seen because validateInputs was being called even if the checking of properties one-by-one hadn't passed (so in this case, the InputWorkspace property was not set and validateInputs tried to use it).
Changeset: e28c4a178e28a35d6b078b07985ef6afe78cb78f
comment:3 Changed 8 years ago by Russell Taylor
- Status changed from accepted to verify
- Resolution set to fixed
To test, verify that following the steps in the description no longer causes a crash.
comment:4 Changed 8 years ago by Russell Taylor
Re #6340. Only call validateInputs() if individual properties are OK.
A crash was seen because validateInputs was being called even if the checking of properties one-by-one hadn't passed (so in this case, the InputWorkspace property was not set and validateInputs tried to use it).
Changeset: a754a453d4f05c4573102bd3d403ab210f34af23
comment:5 Changed 8 years ago by Russell Taylor
Re #6340. Only call validateInputs() if individual properties are OK.
A crash was seen because validateInputs was being called even if the checking of properties one-by-one hadn't passed (so in this case, the InputWorkspace property was not set and validateInputs tried to use it).
Changeset: e28c4a178e28a35d6b078b07985ef6afe78cb78f