Ticket #4174 (closed: invalid)
Segfault when creating an algorithm 50+ times
Reported by: | Janik Zikovsky | Owned by: | Janik Zikovsky |
---|---|---|---|
Priority: | blocker | Milestone: | Release 2.0 |
Component: | Mantid | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | #4122 | Tester: | Martyn Gigg |
Description
If you create an algorithm a number of times = to the algorithms.retained property, you get a segfault.
Will check in a test in FrameworkManagerTest that reproduces this error.
This caused segfault in my LineViewer (#4122).
Change History
comment:1 Changed 9 years ago by Janik Zikovsky
- Owner set to Anyone
- Status changed from new to assigned
- type changed from enhancement to defect
comment:2 Changed 9 years ago by Janik Zikovsky
Refs #4174: Test that segfaults. Fixing the ticket number.
Again, this test segfaults but is commented out. Uncomment to try. This segfault reliably for me at i==50
Changeset: 3779ede7dcde98e86f67c454e6cda1df597d4c23
comment:3 Changed 9 years ago by Martyn Gigg
Janik, the problem here is actually to do with the delete on line 96 of FrameworkManagerTest. The algorithm manager keeps a deque of the last 'algorithms.retained' algorithms. When one drops off the end of the list it is deleted by the manager so I think when your loop gets to fifty there ends up being a double-delete. The first delete from your call to delete then the second one when the algorithm drops off the deque. Removing the delete should solve the problem.
comment:4 Changed 9 years ago by Janik Zikovsky
Refs #4174: Martyn is correct, the delete alg is responsible.
Adding big uppercase warning to future developers NOT to delete the pointer.
Changeset: cb2f4ac3ac5acc5e519fecb110bbf91d85df48c6
comment:5 Changed 9 years ago by Janik Zikovsky
- Owner changed from Anyone to Janik Zikovsky
- Status changed from assigned to accepted
comment:6 Changed 9 years ago by Janik Zikovsky
- Status changed from accepted to verify
- Resolution set to invalid
comment:7 Changed 9 years ago by Janik Zikovsky
Thank you Martyn for spotting that! That will fix my LineViewer problem too.
comment:8 Changed 9 years ago by Martyn Gigg
- Status changed from verify to verifying
- Tester set to Martyn Gigg
comment:10 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 5021