Ticket #1459 (closed: fixed)
Mantid Algorithms inside PythonAlgorithms cause crash
Reported by: | Michael Whitty | Owned by: | Martyn Gigg |
---|---|---|---|
Priority: | major | Milestone: | Iteration 29 |
Component: | Mantid | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Peter Peterson |
Description
Running a python algorithm that contains main mantid algorithms causes a crash around ln 258 of algorithm.cpp example offending python algorithm attached
Attachments
Change History
comment:1 Changed 10 years ago by Michael Whitty
Offending algortihms work when run from inside a Python script, but not when using the Algorithm dialog from algorithms pane. Calling the algorithm dialog function from a python script works, also.
Problem with how the algorithm pane calls the algorithms?
comment:2 Changed 10 years ago by Nick Draper
- Milestone changed from Iteration 26 to Iteration 27
Bulk move of tickets to iteration 27, if your ticket is essential for Iteration 26 then move it back.
comment:3 Changed 10 years ago by Nick Draper
- Milestone changed from Iteration 27 to Iteration 28
Bulk move of tickets at the end of iteration 27
comment:4 Changed 9 years ago by Nick Draper
- Milestone changed from Iteration 28 to Iteration 29
Bulk move of tickets at the end of iteration 28
comment:5 Changed 9 years ago by Martyn Gigg
- Status changed from new to accepted
- Component set to Mantid
I think this is because the main original Python algorithm falls of the stack of managed algorithms when the internal ones are run as managed algorithms.
comment:7 Changed 9 years ago by Martyn Gigg
Test case:
from MantidFramework import PythonAlgorithm, mtd, Direction from mantidsimple import * class SubAlgTest(PythonAlgorithm): def PyInit(self): self.declareProperty('Count', 1, Direction=Direction.Input) def PyExec(self): n_algs = self.getProperty('Count') print 'Number of algs',n_algs name = 'test_' dataX = [i for i in range(11)] dataY = [i for i in range(10)] dataE = [i for i in range(10)] for i in range(n_algs): CreateWorkspace(name + str(i), dataX, dataY, dataE, 1) mantid.registerPyAlgorithm(SubAlgTest())
Use a number that is higher than the algorithms.retained property.
comment:9 Changed 9 years ago by Martyn Gigg
- Status changed from accepted to verify
- Resolution set to fixed
I hope this is fixed now.
comment:10 Changed 9 years ago by Nick Draper
- Status changed from verify to verifying
- Tester set to Nick Draper
comment:11 Changed 9 years ago by Nick Draper
- Status changed from verifying to verify
- Tester Nick Draper deleted
comment:12 Changed 9 years ago by Peter Peterson
- Status changed from verify to verifying
- Tester set to Peter Peterson
comment:13 Changed 9 years ago by Peter Peterson
- Status changed from verifying to closed
The tests run successfully.
comment:14 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 2306