mantidproject / mantid

Main repository for Mantid code
https://www.mantidproject.org
GNU General Public License v3.0
210 stars 122 forks source link

Instrument viewer draw tab crashes when all detectors are masked #34547

Open darominski opened 1 year ago

darominski commented 1 year ago

Describe the bug

Mantid can crash if all detectors are covered by a drawn shape in the Draw tab of Instrument viewer widget and then such a mask is applied to data. This was observed during beta testing of v6.5, but I believe is an issue since at least v6.3.

Observed using data from a number of instruments: ARCS (ARCS_2963.nxs), SALSA, D11B, D22B, D17, CORELLI (CORELLI_29782.nxs).

To Reproduce

  1. Load data, e.g. ARCS_2963.nxs from the UnitTest data.
  2. Open instrument view, go to Draw tab.
  3. Draw a shape covering the entire view of the instrument, e.g. a rectangle.
  4. Press on 'Apply to Data' button.
  5. Observe the crash.

Expected behavior Masking applied correctly to the detectors selected by the drawn shape, no hard crash, or at least a meaningful error message.

Platform/Version (please complete the following information):

Additional context

thomashampson commented 1 year ago

This seems to only be a problem with certain data. So far I've only been able to reproduce it using the data suggested above.