Ticket #1037 (new defect)

Opened 10 months ago

Last modified 5 weeks ago

Crash if accessing python variables assigned to qtiplot windows that have been closed

Reported by: Russell Taylor Owned by: Martyn Gigg
Priority: major Milestone: Iteration 25
Keywords: Cc:
Tester:

Description (last modified by Russell Taylor) (diff)

In the immediate window, if you do:

instrument_view = getInstrumentView("workspace-name")

show the window:

instrument_view.showWindow()

close it manually and then try to use the instrument_view variable again then you get a crash.

The same thing happens for a variable obtained from a graph window that's been closed (e.g. graph_spec = plotSpectrum("RawData", 0) ).

Change History

Changed 10 months ago by Russell Taylor

  • description modified (diff)

Changed 5 weeks ago by Martyn Gigg

  • milestone changed from Iteration 24 to Iteration 25

This is due to python variable pointing to a stale pointer in the same way that the workspace variables used to when a workspace was deleted. That was solved by using a proxy object and returning that when a workspace was requested.

The problem with trying the same thing in MantidPlot is that this would have to be done for absolutely every wrapped MantidPlot function and would be unmaintainable with the current simple exposure using sip.

More investigation into sip and it's return types is needed.

Note: See TracTickets for help on using tickets.