Ticket #5339 (closed: fixed)

Opened 8 years ago

Last modified 5 years ago

Plot MD holds on to memory of deleted workspaces

Reported by: Martyn Gigg Owned by: Russell Taylor
Priority: major Milestone: Release 2.2
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Martyn Gigg

Description

Pascal noticed this during his WISH reductions.

If you run the attached script, they need current runs so access to the ISIS archive, and plot the final slices using right-click PlotMD then go through and delete everything but the final slice workspaces you will see that the memory has not been freed. If you close the plot then the memory is returned.

Attachments

Cs2CoCl4_slicing_15_05_2012.py (6.1 KB) - added by Martyn Gigg 8 years ago.
CsCoCl_rot51pt6.txt (564 bytes) - added by Martyn Gigg 8 years ago.

Change History

Changed 8 years ago by Martyn Gigg

Changed 8 years ago by Martyn Gigg

comment:1 Changed 8 years ago by Nick Draper

  • Owner set to Russell Taylor
  • Status changed from new to assigned

Russell, could you have a look at this please.

comment:2 Changed 8 years ago by Russell Taylor

  • Status changed from assigned to accepted

comment:3 Changed 8 years ago by Russell Taylor

Re #5339. Change to holding the 'original workspace' via a weak_ptr.

Because holding it via a shared_ptr would keep the workspace alive even if it was deleted from the ADS. This also required a modification to a recent checkin under #5358.

Changeset: 1cb3a78e0819f6d0296ce61457e9276d392f2e72

comment:4 Changed 8 years ago by Russell Taylor

Re #5339. Remove IMDWorkspace_sptr member variable.

It's only used in 1 method, so can be a local variable. As it was, it was keeping a deleted workspace alive unnecessarily.

Changeset: 2b86721f79ef9a018c50ad199c6cd2b0f7d98d51

comment:5 Changed 8 years ago by Russell Taylor

Re #5339. Remove a debug print I left in by mistake.

Changeset: a03380e75a184115ec91f8b1c78afbc728bde981

comment:6 Changed 8 years ago by Russell Taylor

Re #5339. Create modal dialog on the stack rather than the heap.

Otherwise the object will exist until MantidPlot is closed.

Changeset: 6fe800dea90bf8c73161c895d31f9c8aca84aca0

comment:7 Changed 8 years ago by Russell Taylor

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

comment:8 Changed 8 years ago by Russell Taylor

To test, try modifying the script to only use a single data run, and probably only load a small part of it (or edit the CropWorkspace call to cut it down more).

comment:9 Changed 8 years ago by Owen Arnold

refs #5358 #5339. Fix and reenable.

Mistake in #5339 broke these tests.

Changeset: db7aadf2223cf25ad8461e0d0101bace689fdfc5

comment:10 Changed 8 years ago by Russell Taylor

Re #5339. Change to holding the 'original workspace' via a weak_ptr.

Because holding it via a shared_ptr would keep the workspace alive even if it was deleted from the ADS. This also required a modification to a recent checkin under #5358.

Changeset: 1cb3a78e0819f6d0296ce61457e9276d392f2e72

comment:11 Changed 8 years ago by Russell Taylor

Re #5339. Remove IMDWorkspace_sptr member variable.

It's only used in 1 method, so can be a local variable. As it was, it was keeping a deleted workspace alive unnecessarily.

Changeset: 2b86721f79ef9a018c50ad199c6cd2b0f7d98d51

comment:12 Changed 8 years ago by Russell Taylor

Re #5339. Remove a debug print I left in by mistake.

Changeset: a03380e75a184115ec91f8b1c78afbc728bde981

comment:13 Changed 8 years ago by Russell Taylor

Re #5339. Create modal dialog on the stack rather than the heap.

Otherwise the object will exist until MantidPlot is closed.

Changeset: 6fe800dea90bf8c73161c895d31f9c8aca84aca0

comment:14 Changed 8 years ago by Owen Arnold

refs #5358 #5339. Fix and reenable.

Mistake in #5339 broke these tests.

Changeset: db7aadf2223cf25ad8461e0d0101bace689fdfc5

comment:15 Changed 8 years ago by Russell Taylor

Re #5339. Change to holding the 'original workspace' via a weak_ptr.

Because holding it via a shared_ptr would keep the workspace alive even if it was deleted from the ADS. This also required a modification to a recent checkin under #5358.

Changeset: 1cb3a78e0819f6d0296ce61457e9276d392f2e72

comment:16 Changed 8 years ago by Russell Taylor

Re #5339. Remove IMDWorkspace_sptr member variable.

It's only used in 1 method, so can be a local variable. As it was, it was keeping a deleted workspace alive unnecessarily.

Changeset: 2b86721f79ef9a018c50ad199c6cd2b0f7d98d51

comment:17 Changed 8 years ago by Russell Taylor

Re #5339. Remove a debug print I left in by mistake.

Changeset: a03380e75a184115ec91f8b1c78afbc728bde981

comment:18 Changed 8 years ago by Russell Taylor

Re #5339. Create modal dialog on the stack rather than the heap.

Otherwise the object will exist until MantidPlot is closed.

Changeset: 6fe800dea90bf8c73161c895d31f9c8aca84aca0

comment:19 Changed 8 years ago by Owen Arnold

refs #5358 #5339. Fix and reenable.

Mistake in #5339 broke these tests.

Changeset: db7aadf2223cf25ad8461e0d0101bace689fdfc5

comment:20 Changed 8 years ago by Dereck Kachere

  • Status changed from verify to verifying
  • Tester set to Dereck Kachere

comment:21 Changed 8 years ago by Dereck Kachere

  • Status changed from verifying to verify
  • Tester Dereck Kachere deleted

comment:22 Changed 8 years ago by Martyn Gigg

  • Status changed from verify to verifying
  • Tester set to Martyn Gigg

comment:23 Changed 8 years ago by Martyn Gigg

  • Status changed from verifying to closed

comment:24 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 6185

Note: See TracTickets for help on using tickets.