Ticket #9952 (closed: fixed)
Crash when opening project with spectrogram
Reported by: | Dan Nixon | Owned by: | Harry Jeffery |
---|---|---|---|
Priority: | major | Milestone: | Release 3.3 |
Component: | GUI | Keywords: | |
Cc: | Blocked By: | #9970 | |
Blocking: | #8503 | Tester: | Dan Nixon |
Description (last modified by Dan Nixon) (diff)
Mantid crashes when opening a saved workspace with a spectrogram plotted from a matrix.
To reproduce:
- Open Mantid and run the attached Python script
- Save the project and close Mantid
- Open Mantid and try to load the saved project
Here is a stack trace of the error
#5 0x00000000006e2deb in QList<QString>::operator[] (this=0x7fffffffbb90, i=1) at /usr/include/qt4/QtCore/qlist.h:477 #6 0x0000000000696335 in ApplicationWindow::openGraph (this=0x1c03000, app=0x1c03000, plot=0x1d23a00, list=...) at /home/dan/mantid2/mantid/Code/Mantid/MantidPlot/src/ApplicationWindow.cpp:11907 #7 0x00000000006466a8 in ApplicationWindow::openProject (this=0x1c03000, fn=..., factorySettings=false, newProject=false) at /home/dan/mantid2/mantid/Code/Mantid/MantidPlot/src/ApplicationWindow.cpp:4728 #8 0x0000000000643019 in ApplicationWindow::open (this=0x1c03000, fn=...,
Attachments
Change History
comment:2 Changed 6 years ago by Dan Nixon
The code seems to be trying to load the workspace name from around here somewhere
<graph> ggeometry 5 5 492 373 PlotTitle ws2D #000000 4228
Which makes sense for this plot which was generated from a workspace named ws2D, however this project also fails to load and produces an index out of bounds error at the same point.
comment:6 Changed 6 years ago by Dan Nixon
- Blocking 8503 added
(In #8503) I would only want to call this finished when I see if the code which appears to load plots from files is actually used.
comment:8 Changed 6 years ago by Harry Jeffery
- Status changed from assigned to verify
- Resolution set to fixed
MantidPlot no longer crashes as a result of loading a spectrogram plot (color fill). v3.2 will always crash, and there is nothing we can do about that, and v3.2 will always save them incorrectly, meaning we cannot load spectograms from projects saved by v3.2. However, since #9970, Mantid does load and save spectrograms correctly, so this crash is fixed.
Compatibility with v3.2 is something that simply cannot be achieved though.
Testing
- Play with spectogram plots
- Load/save them
- Verify Mantid handles them as you would expect
comment:9 Changed 6 years ago by Harry Jeffery
- Status changed from verify to reopened
- Resolution fixed deleted
comment:10 Changed 6 years ago by Harry Jeffery
- Status changed from reopened to verify
- Resolution set to invalid
comment:11 Changed 6 years ago by Dan Nixon
- Status changed from verify to verifying
- Tester set to Dan Nixon
comment:12 Changed 6 years ago by Dan Nixon
Still not working, I get a data search exception now, it looks like it's looking for a workspace but the script creates it from a matrix (not MatrixWorkspace).
Also I get a segfault when I close the empty plot and reproduce #10679 (probably because there is no workspace).
comment:13 Changed 6 years ago by Dan Nixon
- Status changed from verifying to reopened
- Resolution invalid deleted
comment:15 Changed 6 years ago by Harry Jeffery
Refs #9952 Open plots after matrices
We can't plot a matrix if it's not been loaded yet.
Changeset: b3700ecfe0f580bbc3856405269293e8304b8411
comment:16 Changed 6 years ago by Harry Jeffery
Refs #9952 Rework spectrogram source saving
Since v3.2 and prior crash when dealing with spectrograms, we don't have to worry about compatibility, so we're allowed to deal with this a little more simply.
If the spectrogram's based off a matrix, we specify the matrix by its name. If the spectrogram's based off a workspace, we specify the workspace by its name.
Load and save accordingly.
Changeset: d35220179d6acabb7377361d7f60907a53b24e7e
comment:17 Changed 6 years ago by Harry Jeffery
- Status changed from inprogress to verify
- Resolution set to fixed
Spectograms of matrices (not workspaces) are now loaded/saved correctly.
comment:19 Changed 6 years ago by Dan Nixon
- Status changed from verifying to closed
Merge remote-tracking branch 'origin/feature/9952_spectrogram_crash'
Full changeset: ce08a5c1371bc9a0e467f60b91d067fa4993cd78
comment:20 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 10794