Ticket #8741 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

[Muon] Uncaught exception when changing the instrument

Reported by: Arturs Bekasovs Owned by: Arturs Bekasovs
Priority: critical Milestone: Release 3.1
Component: Muon Keywords:
Cc: Blocked By:
Blocking: Tester: Russell Taylor

Description

Trying to change the instrument on the Home tab of MuonAnalysis with some data already loaded causes an exception to be thrown.

Change History

comment:1 Changed 7 years ago by Arturs Bekasovs

  • Priority changed from major to critical

comment:2 Changed 7 years ago by Arturs Bekasovs

  • Status changed from new to inprogress

Refs #8741. Do a few minor fixes.

Found by Eclipse: Qt3 archaisms and catching exception by value.

Changeset: d91f354de2e44b0c11856ce0da00f8334548ce17

comment:3 Changed 7 years ago by Arturs Bekasovs

Refs #8741. Remove all the trailing spaces.

Changeset: e73ad9ad4e6348baa992b077ae034412fb15052f

comment:4 Changed 7 years ago by Arturs Bekasovs

Refs #8741. Replace currentIndexChanged with activated.

currentIndexChanged is called no matter how the index was changed - by user or e.g. when the combo-box was cleared. activated is emitted only when user clicks on the thing, which is the only case when we want to update the plot.

Changeset: ecd74f73baf3b1ac45cc86c032be5461c6583089

comment:5 Changed 7 years ago by Arturs Bekasovs

Refs #8741. Add explicit call to plot update.

Before that, changing the current item would cause the plot update just because the list of functions was updated. This is not working with new approach and is really not apparent anyway.

Changeset: 641b8246e3dd52c155fee75b73ab42d94c7ae607

comment:6 Changed 7 years ago by Arturs Bekasovs

Refs #8741. Remove blockSignals() fix.

It was done to fix the problem with currentIndexChanged() which is not a problem anymore.

Changeset: 259dfb5d88ecba68c5b0c7f006a35f72b14d59b3

comment:7 Changed 7 years ago by Arturs Bekasovs

Refs #8741. Split the notion of change and auto-update.

There are still certain things we want to update when the index is changed to synchronize stuff. So we still need something to be connected to currentIndexChanged(int) signal, though it shouldn't cause the plot to be updated.

Changeset: 7f09321c7e19eab7bd10a4b0b57fd1cbc19c566a

comment:8 Changed 7 years ago by Arturs Bekasovs

Refs #8741. Remove exception throwing.

This shouldn't be actually thrown as empty groups selector is an expected situation - you can e.g. just clear the grouping table.

Changeset: 4bcfc792afe0557eccb2d2485ff75b01dce826e5

comment:9 Changed 7 years ago by Arturs Bekasovs

Refs #8741. Revert "Remove all the trailing spaces."

This introduced a lot of pain when merging.

Changeset: 51cd3a70c7c0d6d17a070ff9bc8494effcfd3ff8

comment:10 Changed 7 years ago by Arturs Bekasovs

Tester:

I've had to change quite a bit of code here for such a trivial problem, but that is just because I am tired of such kind of problems, caused by the fact that plot auto-update is initiated by ANY kind of combo-box value change, even when it is e.g. cleared programatically. This makes it very difficult to trace when something gets called (which is why the code if full of various "isUpdating" flags).

I've made all (hopefully) of the calls to auto-update functions be initiated by user-caused signals only and left value-changed signals for rare cases when synchronization between widgets is needed.

These changes should be verified quite exhaustively, though a subset of widgets which should be "clicked through" is limited - combo-boxes only. So please make sure you've checked the following:

  1. Described scenario doesn't lead to an unhandled exception anymore.
  2. When instrument was changed and grouping was cleared, trying to plot or auto-update the plot should do nothing. After loading new data, everything should be back to normal.
  3. Combo-boxes on Home and Grouping tab are functional - changing them with auto-update enabled should cause the plot to be updated.
  4. Changing the current group or plot function on the grouping tab should update corresponding widgets on the home tab.

comment:11 Changed 7 years ago by Arturs Bekasovs

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

comment:12 Changed 7 years ago by Russell Taylor

  • Status changed from verify to verifying
  • Tester set to Russell Taylor

comment:13 Changed 7 years ago by Russell Taylor

  • Status changed from verifying to closed

Merge remote branch 'origin/bugfix/8741_muon_instr_change_exception'

Full changeset: c5011865557fa0bd8dab9883a24bbfee63852ef7

comment:14 Changed 7 years ago by Russell Taylor

No more exception after the changes. Described changes behave OK and a bit of random playing appeared not to cause anything untoward.

comment:15 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 9585

Note: See TracTickets for help on using tickets.