Ticket #8731 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

[Muon] Mantid freezes when using Muon Analysis interface in maximized mode

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

Description

To reproduce:

  1. Open Muon Analysis interface.

  1. Maximize it.
  1. Try to open and plot any Muon data file.

Change History

comment:1 Changed 7 years ago by Arturs Bekasovs

  • Status changed from new to inprogress

Refs #8731. Disable Peak Picker tool when Fit Prop. browser deleted.

Otherwise need to do that manually in MuonAnalysis, which is very error-prone.

Changeset: 1a00e45f286e2e725031032413794a5a1568a707

comment:2 Changed 7 years ago by Arturs Bekasovs

Refs #8731. Minor refactoring.

Changeset: 7d5698acdff86cbfd761e5b38fe2326db69cd681

comment:3 Changed 7 years ago by Arturs Bekasovs

Refs #8731. Toolbar hiding as signal.

We don't need it to be called instantly and this avoid the kinds of problem we faced in a ticket. Things in hideEvent and showEvent should ideally just emit queued signals.

Changeset: 4576ce65b36749287fab8e6da0978fd623b4fe9c

comment:4 Changed 7 years ago by Arturs Bekasovs

This turned out to be quite a complicated bug. The main reason is that the interface is allowed to run a single Python thread only. When there is a Python task which calls another Python task, we get a dead-lock.

In our case, when interface was maximized, in order to get a place for the new plot, Qt would shrink the interface, which involved hiding it for a while. hideEvent of MuonAnalysis had some Python code in it, which caused the problem.

I've replaced direct Python calls with queued signal/slot connections and made a few other small changes.

comment:5 Changed 7 years ago by Arturs Bekasovs

Tester:

  1. Make sure the bug is not reproducible anymore.
  1. Check that Peak Picker tool (dotted lines on the plot) do disappear when the interface is closed while on Data Analysis tab.
  1. Check that Hide Toolbars setting in functional, when
    1. Changing it.
    2. Opening/closing the interface when it's enabled.

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 Jay Rainey

  • Status changed from verify to verifying
  • Tester set to Jay Rainey

comment:8 Changed 7 years ago by Jay Rainey

  • Status changed from verifying to closed

I downloaded, installed and ran Mantid 3.0 in order to observe the deadlock occurring. I then build this branch locally and ran it.

  1. The bug/deadlock no longer exists. It now contracts and shows both the MUON GUI and plot if the user is in full-screen and then plots.
  2. The Peak Picker tool does disappear when the interface is closed (regardless of tab). However, I noticed that if the user is in the Data Analysis tab and clicks Display then Plot guess, and then increases the data-range (moves the dotted line on plot) the Plot guess is not dynamically updated. I will open another ticket for this (as it's related to fitting and not MUON).
  3. The Hide Toolbars option functions as expected.

The code is well written and easy to understand.

Last edited 7 years ago by Jay Rainey (previous) (diff)

comment:9 Changed 7 years ago by Jay Rainey

Merge remote-tracking branch 'origin/bugfix/8731_muon_fullscreen_freeze'

Full changeset: 2003821fc9e331a07e9ab6ebf8caa75c0c0a6f90

comment:10 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 9575

Note: See TracTickets for help on using tickets.