Ticket #7843 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

The Step Scan GUI needs to run algorithms asynchronously

Reported by: Russell Taylor Owned by: Russell Taylor
Priority: critical Milestone: Release 3.0
Component: GUI Keywords: LiveData
Cc: Blocked By:
Blocking: #7785 Tester: Michael Reuter

Description

This needs, already mentioned in a TODO, has become more urgent with the changes in #7785 as the whole of MantidPlot will now lock up if you try to start collecting data when outside a run. This locking up would last until a run starts - the logging will not get out and there will be no opportunity to cancel.

Change History

comment:1 Changed 7 years ago by Russell Taylor

  • Status changed from new to inprogress

Re #7843. Allow AlgorithmRunner to have a parent set.

This follows Qt conventions.

Changeset: 5b5fba5819ad613dbf728296968272d81bdf8cb9

comment:2 Changed 7 years ago by Russell Taylor

Re #7843. Existing uses of AlgorithmRunner were leaked.

Changeset: 4753f18b8702c0c58fceb2506dfe738c5c8db314

comment:3 Changed 7 years ago by Russell Taylor

Re #7843. Make variable names more general.

Changeset: 3ea271163c6e9e4134c3489b7cedda870a8387c8

comment:4 Changed 7 years ago by Russell Taylor

Re #7843. Fix a memory leak.

Changeset: 2322a88bc2e714d7a874f86333a0eeeb3c847b53

comment:5 Changed 7 years ago by Russell Taylor

  • Milestone changed from Backlog to Release 3.0

comment:6 Changed 7 years ago by Russell Taylor

Re #7843. Disconnect observers if cancelling or deleting.

Because very bad things happen if the handlers are called after the object they live in has been deleted!

Changeset: 9f99d4e7781d83f961d70a38b412f89c5a72b3cf

comment:7 Changed 7 years ago by Russell Taylor

Re #7843. Run file and live data loading algorithms asynchronously.

Using the AlgorithmRunner class.

Changeset: 6a7f0b1a0b4cafdb591d2d71d72dd63c6a7116ca

comment:8 Changed 7 years ago by Russell Taylor

Re #7843. Cancel any already-running alg if a new one is started.

This avoid the temporal coupling where a user needs to know that they ought to call cancel before starting off an algorithm.

Changeset: 29c566ae3ec0c27d076a7bb255a734cf5bb64fee

comment:9 Changed 7 years ago by Russell Taylor

Re #7843. Run StartLiveData asynchronously when start is pressed.

The StepScan algorithm itself is fast so there's no real need to make that asynchronous. The other changes are mainly to trap or avoid possible error conditions.

Changeset: fb4a47b239096be31e49a626bdbe56129dad27de

comment:10 Changed 7 years ago by Russell Taylor

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

Tester: Branch is feature/7843_stepscan_async_alg_running

This really needs to be tested at the SNS. Make SEQUOIA your default instrument - this should mean that the live button will be enabled so that you can test the live stuff.

To test, start the 'Step Scan Analysis' GUI from the Interfaces menu and try to break things while algorithms are running in the background! A good file to test with (you can also test with invalid files) is HYSA_2934.nxs.h5 in the System Test repository. Files are loaded as soon as they are entered. Try closing the interface or clicking other things while things are loading. Note that if SEQUOIA is not in a run, the live option will fail immediately - you'll probably need to try again later. The live aspects also happen asynchronously when 'Start' is pressed - try clicking other things/closing the GUI while that is going on.

My aim here is for a smooth experience, that the user cannot crash or generate an unexpected exception from - no matter what they press and in what order!

As I also made changes to the AlgorithmRunner class, it is important to test the other place that uses it. This is the SliceViewer, when BinMD is run. This happens when 'Dynamic Rebin Mode' is selected in the View menu, or when Live Mode is enabled and dragged-out line is integrated.

Last edited 7 years ago by Russell Taylor (previous) (diff)

comment:11 Changed 7 years ago by Michael Reuter

  • Status changed from verify to verifying
  • Tester set to Michael Reuter

comment:12 Changed 7 years ago by Michael Reuter

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/7843_stepscan_async_alg_running'

comment:13 Changed 7 years ago by Vickie Lynch

Last edited 7 years ago by Vickie Lynch (previous) (diff)

comment:14 Changed 7 years ago by Vickie Lynch

Last edited 7 years ago by Vickie Lynch (previous) (diff)

comment:15 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8688

Note: See TracTickets for help on using tickets.