Ticket #7113 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Double click on QTPlot properties kills mantid... became: crashes when using empty column in plot associations dialog

Reported by: Alex Buts Owned by: Federico M Pouzols
Priority: minor Milestone: Release 3.3
Component: Framework Keywords:
Cc: Blocked By:
Blocking: Tester: Dan Nixon

Description (last modified by Federico M Pouzols) (diff)

running script

t=newTable("Table1",10,3)
for i in xrange(1,10):
	  t.setCell(1,i,i)
	  t.setCell(2,i,i*i)
	 
l = newGraph("MyTest").activeLayer()	 
 
l.setAntialiasing()
l.insertCurve(t, "Table1_2", Layer.Scatter) # returns a boolean indicating success or failure

creates a graph (visible after click on the graph window)

double click on the graph's line opens MantidPlot->plot details dialogue with MyTest->Layer1->Table1 chain opened on layer1

Attempt to click on Table1 crashes Mantid on win64 (did not try anything else)

P.S. Sometimes you still can click on Table 1 and it opens 2 curves submenu, where you have to click on other curve except selected to kill Mantid

Change History

comment:1 Changed 7 years ago by Nick Draper

  • Owner set to Alex Buts
  • Status changed from new to assigned

This seems to work form me

comment:2 Changed 7 years ago by Alex Buts

  • Status changed from assigned to accepted

comment:3 Changed 7 years ago by Nick Draper

  • Status changed from accepted to assigned
  • Owner changed from Alex Buts to Anyone
  • Priority changed from major to minor

comment:4 Changed 7 years ago by Alex Buts

Recent changes to graphic seems changed/improved this behaviour but the problem still exist (though less profound)

one has to run script, double click on line -> (opens Matnid plot details) and DOUBLE CLICK on the table menu (MyTest->Layer1->Table1) this opens Mantid Plot -> plot association window, clicking where (trying to change it) kills Mantid.

This happens regardless of information existing in the column 3 of the table. (one can add setCell(3 in the loop)

Last edited 7 years ago by Alex Buts (previous) (diff)

comment:5 Changed 7 years ago by Nick Draper

  • Status changed from assigned to new

comment:6 Changed 7 years ago by Nick Draper

  • Component changed from Mantid to Framework

comment:7 Changed 7 years ago by Nick Draper

  • Milestone changed from Release 2.6 to Backlog

Moved to the Backlog after the code freeze for R2.6

comment:8 Changed 7 years ago by Nick Draper

  • Status changed from new to assigned

bulk move to assigned at the into of the triage step

comment:9 Changed 6 years ago by Federico M Pouzols

  • Owner changed from Anyone to Federico M Pouzols
  • Status changed from assigned to inprogress
  • Description modified (diff)

At first i thought I could not reproduce the crashes described here. There must have been some improvements in the plot associations window. But eventually I could make it crash:

  • If you open the associations window, modify associations, close it and then open it for a second time, it will crash. Sometimes it will crash the first time you open it.
  • Open the associations window, change some of them, click ok. then in the parent dialog click accept. You'll get another crash.

There are issues at least in showPlotAssociations() and acceptParams(). Modifying associations and restoring them doesn't seem to work well either.

comment:10 Changed 6 years ago by Federico M Pouzols

  • Summary changed from Double click on QTPlot properties kills mantid to Double click on QTPlot properties kills mantid... became: crashes when using empty column in plot associations dialog

Further observations: presently, if you fill in the values of column 3 there seems to be no crash (the comment above assumes you use column three without giving values). And you don't need to fill in the whole column, just one value will do. This is a very qti / Qwt-ish issue.

So the issue has narrowed down to crashes when using an empty column in the plots association dialog.

Last edited 6 years ago by Federico M Pouzols (previous) (diff)

comment:11 Changed 6 years ago by Federico Montesino Pouzols

AssocDialog needs to be modal, like PlotDialog, re #7113

Changeset: 68aaa1ff3af1c56e7299bc76f6f1319c1237c9be

comment:12 Changed 6 years ago by Federico M Pouzols

Sorry I made a mistake, and sent this commit: https://github.com/mantidproject/mantid/commit/c74a9a403df8ded05f2cc847cb973c5e2f889fe6 to a wrong ticket number.

comment:13 Changed 6 years ago by Federico M Pouzols

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

The use of empty curves (coming from empty data/spreadhseet columns) was causing trouble everywhere in AssociationsDialog and PlotDialog. I thought that the tidiest solution would be to forbid the association of empty curves. This stops the issue from the beginning and avoids the need for many many checks in multiple methods and slots.

I made AssociationsDialog modal, as it was done at some point in the past with PlotDialog. After all, AssociationDialog is opened as a child of PlotDialog. This prevents the user from editing some columns to an inconsistent/empty status while associating new curves.

Also AssociationsDialog has been modified so that empty columns are listed in the table but in a disabled state, so you can never make the mistake of adding an empty curve.

To test:

  • Try to reproduce the issues described in the initial ticket description and comment:4. Nothing bad should happen in recent versions of Mantid (and definitely not after applying the fixes in this ticket).
  • Try to reproduce the issue described in comment:9 and comment:10: using an empty column in "plot associations". You should not be able to do so and you should not get any crash. Empty curves (columns in the source table) should be disabled in the associations dialog.

Tests can do little about this, but still they should pass.

You can also use this slightly modified version of the script given in the ticket description:

t=newTable("Table1",10,4)
for i in xrange(1,10):
	t.setCell(1,i,i)
	t.setCell(2,i,i*i)
t.setCell(4, 6, 0.6)
l = newGraph("MyTest").activeLayer()	 
l.setAntialiasing()
l.insertCurve(t, "Table1_2", Layer.Scatter)

comment:14 Changed 6 years ago by Federico M Pouzols

  • Milestone changed from Backlog to Release 3.3

comment:15 Changed 6 years ago by Dan Nixon

  • Status changed from verify to verifying
  • Tester set to Dan Nixon

comment:16 Changed 6 years ago by Dan Nixon

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/bugfix/7113_crash_qti_table_dbl_click'

Full changeset: 8d7528a7023b82dc9413278ff2ab9a653472c719

comment:17 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 7959

Note: See TracTickets for help on using tickets.