Ticket #7559 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

[IDA] ConvFit - File paths on Linux/Mac cause a crash

Reported by: Samuel Jackson Owned by: Samuel Jackson
Priority: major Milestone: Release 3.0
Component: Indirect Inelastic Keywords:
Cc: Blocked By:
Blocking: Tester: Michael Reuter

Description (last modified by Samuel Jackson) (diff)

The IDA ConvFit tab can crash Mantid when a file has been selected using the file browser. There's a suspicion that this is caused by the difference in file paths between Windows and Mac/Linux.

To reproduce:

  • Put irs26174_graphite002_red.nxs and irs26173_graphite002_res.nxs found in the sample data into a file path that Mantid can find.
  • Open the IDA interface and go to ConvFit
  • Put the file names (without the path) into each of the boxes.
  • Set the following parameters:
    • Tick plot guess
    • Fit type: 1 Lorenzian
    • StartX: -0.5, EndX: 0.5, Amplitude: 50
  • Hit run and watch it crash

Leaving in the full file path stops it from crashing, but running sequential fit with the same parameters will cause the following error:

ValueError: Invalid value for property Function (Function) "name=LinearBackground,A0=0.0,A1=0,ties=(A0=0.0,A1=0.0);(composite=Convolution;name=Resolution, FileName=/home/chs18285/Downloads/irs26173_graphite002_res.nxs;(name=Lorentzian,Height=5.63805,PeakCentre=-0.001071,HWHM=0.01426))": Error in input string to FunctionFactory
name=LinearBackground,A0=0.0,A1=0,ties=(A0=0.0,A1=0.0);(composite=Convolution;name=Resolution, FileName=/home/chs18285/Downloads/irs26173_graphite002_res.nxs;(name=Lorentzian,Height=5.63805,PeakCentre=-0.001071,HWHM=0.01426))
  at line 14 in '<Interface>'
  caused by line 204 in '/opt/Mantid/scripts/Inelastic/IndirectDataAnalysis.py'
  caused by line 115 in '/opt/Mantid/scripts/Inelastic/IndirectDataAnalysis.py'
  caused by line 185 in '/opt/Mantid/bin/mantid/simpleapi.py'

Change History

comment:1 Changed 7 years ago by Samuel Jackson

  • Description modified (diff)

comment:2 Changed 7 years ago by Nick Draper

  • Owner set to Samuel Jackson

comment:3 Changed 7 years ago by Samuel Jackson

  • Status changed from new to verify
  • Resolution set to worksforme

This issue appears to have been fixed through other tickets. To verify, try running ConvFit with the given parameters. It appears to no longer crash.

comment:4 Changed 7 years ago by Michael Reuter

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

comment:5 Changed 7 years ago by Michael Reuter

  • Status changed from verifying to reopened
  • Resolution worksforme deleted

I had to use irs26176_graphite002_red.nxs as the other file isn't available, but this is crashing on Ubuntu, OSX and Windows with the latest master build. I seem to be getting the crashes when I try to set the StartX value in the GUI.

comment:6 Changed 7 years ago by Samuel Jackson

  • Status changed from reopened to inprogress

Added auto searching to RES file.

Also added exception to catch invalid input.

Refs #7559

Changeset: d80916609389448648b2763d8b3bdf0feaa5d396

comment:7 Changed 7 years ago by Samuel Jackson

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

To Test

Rerun the test in the ticket description with any *_red/*_res file you like. The problem was with the *_res file path validation so pay extra attention to ensuring this works by passing it different combinations of valid and invalid files.

comment:8 Changed 7 years ago by Michael Reuter

  • Status changed from verify to verifying

comment:9 Changed 7 years ago by Michael Reuter

This looks to be working now.

comment:10 Changed 7 years ago by Michael Reuter

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/7559_ConvFit_filepath_crash'

comment:11 Changed 7 years ago by Nick Draper

  • Component changed from Framework to Indirect Inelastic

comment:12 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8404

Note: See TracTickets for help on using tickets.