Ticket #9798 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

SliceViewer and VATES simple interface kill mantid while visualizing a MD workspace with an infinite dimension

Reported by: Alex Buts Owned by: Michael Reuter
Priority: blocker Milestone: Release 3.2.1
Component: Framework Keywords: patchCandidate
Cc: Blocked By:
Blocking: Tester: Alex Buts

Description

run script

CreateSampleWorkspace(OutputWorkspace='TWS', WorkspaceType='Event')
ConvertToMD(InputWorkspace='TWS', QDimensions='Q3D', dEAnalysisMode='Elastic', QConversionScales='HKL', OutputWorkspace='mdWs1', SplitInto='100,100,10')

and try to look at the resulting workspace (mdWs1) using SliceViewer.

Mantid hangs up for some time but returns with "unhandled Exception" caught

If you try to look at this workspace using VATES simple interface, the Mantid is instantly killed.

Change History

comment:1 Changed 6 years ago by Alex Buts

  • Keywords PatchCandidate added
  • Milestone changed from Backlog to Release 3.3

comment:2 Changed 6 years ago by Nick Draper

  • Status changed from new to assigned
  • Owner set to Michael Reuter

comment:3 Changed 6 years ago by Michael Reuter

I've tried to replicate this on Windows and OSX using the 3.2 release and on Windows, RHEL6 and Fedora 20 using the latest master. In any circumstance, I cannot get it to crash in the VSI. It displays, but no data is shown, which is a different issue. However, the SliceViewer does crash since it tries to allocate more memory than the machine has when it hits the infinite dimension. It's trying to allocate 16 Exabytes (at least on my machine) of memory for the infinite dimension. Yikes!

comment:4 Changed 6 years ago by Alex Buts

yes, it is possible I just had a problem with VSI on one of the machines, which caused crashes in man other cases.

As it coincided with sliceviewer crashes, I may erroneously bundle them together.

comment:5 Changed 6 years ago by Michael Reuter

I have to amend my statement about the SliceViewer. While it does not crash, it does throw a std::bad_alloc (or bad allocation) due to the infinite dimension. My suggestion is to check the dimension limits for infinities and such and still throw an exception that can be caught, but containing more useful information. The exception will be one that can be continued from without issue I believe.

comment:6 Changed 6 years ago by Michael Reuter

  • Status changed from assigned to inprogress

Refs #9798. Checking dimension ranges for bad values.

Changeset: 897d7b67e1d508e031ceae2982c0c828b66b60bb

comment:7 Changed 6 years ago by Michael Reuter

Refs #9798. Fixing patch issue.

This stemmed via branching from a stale tag.

Changeset: 0210eed4a411fd841fdd371007c118a4e4c91edf

comment:8 Changed 6 years ago by Peter Peterson

  • Keywords PatchCandidate removed
  • Milestone changed from Release 3.3 to Release 3.2.1

comment:9 Changed 6 years ago by Michael Reuter

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

The branch can be found here.

To test: Run the lines above before the fix to see that an exception is thrown, but not a lot of information given. After the fix, an exception will still be thrown, but more information is presented as to what went wrong. The exception is necessary to halt the creation of the SliceViewer.

comment:10 Changed 6 years ago by Alex Buts

  • Status changed from verify to verifying
  • Tester set to Alex Buts

comment:11 Changed 6 years ago by Alex Buts

  • Keywords patchCandidate added
  • Status changed from verifying to closed

There is improvement to the behaviour and no crash, so the ticket worth including into the patch release, but the issue is not entirely sorted, so I wrote the follow up ticket #10130

comment:12 Changed 6 years ago by Alex Buts

Merge remote-tracking branch 'origin/bugfix/9798_sliceviewer_inf_dim'

Full changeset: 861f79ec86b059070a90bb072c57b13a09570930

comment:13 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 10640

Note: See TracTickets for help on using tickets.