Ticket #7407 (assigned)
Crash with pointer to Property in Python
Reported by: | Martyn Gigg | Owned by: | Martyn Gigg |
---|---|---|---|
Priority: | major | Milestone: | Backlog |
Component: | Python | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: |
Description (last modified by Nick Draper) (diff)
The attached minimal script crashes Mantid on completion, presumably when the Python session is being tidied up and there's still a pointer around to a log value (time series) from a temporary Workspace that has since been deleted.
(The print and time.sleep() statements are just to see what it's doing and when)
Resetting the pointer variable to something else before the script exits (but even after the DeleteWorkspace) seems to be a work around, as is not deleting the temporary workspace...
James. (Mantid 2.5.3)
import time fn="//hifi/data/hifi00054050.nxs" # any file might do time.sleep(1.0) print "loading..." ws=LoadMuonNexus(fn,OutputWorkspace="DarkCountsTmp")[0] print "loaded." time.sleep(1.0) print "getting pointer to log" gf=ws.getRun().getLogData("Beamlog_Good_Frames_Total") time.sleep(1.0) print "final log value in Good Frames was ",gf.value[-1]," at ",gf.times[-1] time.sleep(1.0) print "deleting..." # "work around" by un-commenting the line below # gf=0 # clear out the pointer in advance DeleteWorkspace(ws) print "deleted." time.sleep(1.0) print "finished." time.sleep(1.0)
Change History
comment:2 Changed 7 years ago by Nick Draper
- Status changed from new to assigned
- Owner set to Martyn Gigg
- Description modified (diff)
comment:5 Changed 7 years ago by Nick Draper
- Milestone changed from Release 2.6 to Backlog
Moved to backlog at the code freeze for R2.6
Note: See
TracTickets for help on using
tickets.