Ticket #5288 (closed: fixed)

Opened 8 years ago

Last modified 5 years ago

Clicking Apply/OK in the user preferences dialog throws an exception on Windows

Reported by: Russell Taylor Owned by: Russell Taylor
Priority: critical Milestone: Release 2.1.1
Component: MantidPlot Keywords: PatchCandidate,Released
Cc: Blocked By:
Blocking: Tester: Robert Whitley

Description (last modified by Russell Taylor) (diff)

In the 2.1.0 release version, any click of 'Apply' or 'OK' in the preferences leads to a "Sorry, MantidPlot has caught an unexpected exception" dialog box.

The message is "File not found".

This is a version installed using the installer. I have not observed this on any non-Windows platform, or with a locally-built MantidPlot on Windows.

Change History

comment:1 Changed 8 years ago by Russell Taylor

  • Description modified (diff)

comment:2 Changed 8 years ago by Russell Taylor

  • Keywords PatchCandidate added

comment:3 Changed 8 years ago by Russell Taylor

  • Owner set to Russell Taylor
  • Status changed from new to accepted
  • Description modified (diff)
  • Summary changed from Trying to change default instrument throws an exception on Windows to Clicking Apply/OK in the user preferences dialog throws an exception on Windows

comment:4 Changed 8 years ago by Russell Taylor

This turns out to be coming from the Poco::File objects in the pathEqual() method that's called from ConfigDialog::setString()- it has a problem with the relative paths that are now in Mantid.properties since the change of installer technology. It turns out that the motivation for this method is to prevent path type properties being written out to Mantid.user.properties when the only difference is a "/" at the end.

A much simpler way to prevent this is to call getString() to get the current value of the property, rather than just the underlying Poco method (as the former does extra work transforming relative paths).

comment:5 Changed 8 years ago by Russell Taylor

Re #5288. Simplify code for setting config service properties.

Eliminates an exception on Windows when setting user preferences.

Changeset: 223ba83f49989cca143ced1722734d7c7fd46ec2

comment:6 Changed 8 years ago by Russell Taylor

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

Note that the above commit went to the master branch, so it will need to be pulled across if wanted for a patch release.

comment:7 Changed 8 years ago by Russell Taylor

Re #5288. Simplify code for setting config service properties.

Eliminates an exception on Windows when setting user preferences.

Changeset: 223ba83f49989cca143ced1722734d7c7fd46ec2

comment:8 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.2 to Release 2.1.1

Moved for inclusion in the 2.1.1 patch

comment:9 Changed 8 years ago by Russell Taylor

Re #5288. Simplify code for setting config service properties.

Eliminates an exception on Windows when setting user preferences.

Changeset: 223ba83f49989cca143ced1722734d7c7fd46ec2

comment:10 Changed 8 years ago by Robert Whitley

  • Status changed from verify to verifying
  • Tester set to Robert Whitley

comment:11 Changed 8 years ago by Robert Whitley

  • Status changed from verifying to closed

This ticket has fixed the problem but I have managed to get the exception to throw once. I have created a ticket #5433 to fix this. It would be very rare that the user finds this exception so I have moved that ticket to the next release.

comment:12 Changed 8 years ago by Russell Taylor

Re #5288. Simplify code for setting config service properties.

Eliminates an exception on Windows when setting user preferences.

Changeset: 223ba83f49989cca143ced1722734d7c7fd46ec2

comment:13 Changed 7 years ago by Nick Draper

  • Keywords PatchCandidate,Released added; PatchCandidate removed

comment:14 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 6134

Note: See TracTickets for help on using tickets.