Ticket #8862 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Bug in grouping when adding invalid range

Reported by: Anders Markvardsen Owned by: Arturs Bekasovs
Priority: critical Milestone: Release 3.1
Component: Muon Keywords:
Cc: stephen.cottrell@… Blocked By:
Blocking: Tester: Anders Markvardsen

Description

  1. Open emu00030604.nxs
  1. Go to grouping tab add entry with name e.g. '3' and '97-'
  1. click somewhere else on interface which pops up massage: 'Sorry, Mantidplot has caught an unexpected exception....'

The dataset contains 192 spectra.

Steve writes:

There’s a second problem relating to editing the group table. I’d say this is just an oddity and not so urgent to solve. Load run 30604 (you’ll probably need to reopen the interface if you’ve just tried the previous test). The first 96 detectors are correctly grouped, but you need to create groups for the second 96. Create a group name ‘3’ and enter ’97-‘ but click in another box before entering the final value (it should be ‘97-144’). An error box appears. Unfortunately after clearing the error the interface becomes unusable.

Attachments

emu00030604.nxs (2.0 MB) - added by Anders Markvardsen 7 years ago.

Change History

Changed 7 years ago by Anders Markvardsen

comment:1 Changed 7 years ago by Arturs Bekasovs

  • Priority changed from major to critical
  • Status changed from new to inprogress
  • Milestone changed from Release 3.2 to Release 3.1

This is definitely a regression - I've used a standard function (Strings::parseRange) instead of a custom code to parse these numeric ranges and it apparently throws exceptions when something is wrong. This is pretty big, but should be easy to fix by just catching the exception, so I am tempted to fit it in 3.1.

comment:2 Changed 7 years ago by Arturs Bekasovs

  • Summary changed from Muon: bug in groupping when adding e.g. 97- to Bug in grouping when adding invalid range

comment:3 Changed 7 years ago by Arturs Bekasovs

Refs #8862. Catch the exception from Strings::parseRange.

Changeset: 163323b32659587dc4d85ae26cdf337dfc3931ab

comment:4 Changed 7 years ago by Arturs Bekasovs

Refs #8862. Fix the problem with loaded ws being grouped twice.

Changeset: 896c5e520ab4af629a707b4e69a745510852e6de

comment:5 Changed 7 years ago by Arturs Bekasovs

Tester:

  • Verify that the problem described is not happening anymore.
  • Go through the following scenario:
    1. Load the attached emu00030604.nxs in MuonAnalysis.
    2. In Grouping Options, add a new group with any name. Try setting invalid ranges like "1-", "-1", "abc", " ", "." etc.
      • No exception should be thrown, but Ndet column should be set to "Invalid IDs string".
      • New group should not be available for plotting neither from Grouping Options tab nor from he Home tab.
      • MuonAnalysisGrouped workspace should contain 2 spectra, which means the new group is not used.
    3. Now add another group, and set its DetectorIDs to inadequately large numbers, e.g. "1000-1200". Make sure appropriate error is shown. MuonAnalysisGrouped should still contain 2 groups only.
    4. Change the DetectorIDs of the last group to a sane value, e.g. "1-15". No errors should be reported. MuonAnalysisGrouped should now contain 3 groups.
    5. Plot the last group. Should be plotted fine.

comment:6 Changed 7 years ago by Arturs Bekasovs

  • Status changed from inprogress to verify
  • Resolution set to fixed

comment:7 Changed 7 years ago by Anders Markvardsen

  • Status changed from verify to verifying
  • Tester set to Anders Markvardsen

comment:8 Changed 7 years ago by Arturs Bekasovs

Refs #8862. Catch the exception from Strings::parseRange.

Changeset: 1c8fcd8e032dbd4e6426b84f6f8e35bf7ef0577d

comment:9 Changed 7 years ago by Arturs Bekasovs

Refs #8862. Fix the problem with loaded ws being grouped twice.

Changeset: 9942308ea0086faf4a8238819f3118dabf80fe2d

comment:10 Changed 7 years ago by Anders Markvardsen

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/bugfix/8862_muon_grouping_invalid_range'

Full changeset: 24d9f2c2d99153e854cd0318ba9642313055dab2

comment:11 Changed 7 years ago by Anders Markvardsen

Now handles this case by returning string 'Invalid IDs string' in Ndet column

comment:12 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 9706

Note: See TracTickets for help on using tickets.