-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Indirect Data Reduction crash when open/close interface multiple times #37412
Fix Indirect Data Reduction crash when open/close interface multiple times #37412
Conversation
285aa52
to
a63f952
Compare
a63f952
to
09c3fa5
Compare
09c3fa5
to
8cfc8b8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looking good, just noticed a few places to make use of ref assignment. I'm aware much of this is due for changes when converting to MVP, so I'm happy for that to be maintenance if you think it's too much of a pain to re-run the CI.
Otherwise crashes are resolved, tried many different variations of opening and closing windows, while running etc. and had no crashes.
Just want to check if the crash behaviour is unit-testable?
qt/scientific_interfaces/Inelastic/Manipulation/DataManipulationInterface.cpp
Outdated
Show resolved
Hide resolved
Thanks for the review! Unfortuantely this area is not easily unit testable - I'm hoping this will change in the future when MVP has been completed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amendments to the code look good. Still working as expected without crashing when opening/closing GUIs. Changes to docs unneeded. Not currently unit-testable. Nice work.
Description of work
This PR fixes a crash when you open Indirect Data Reduction, close it, and then open it again. The presenter for the ISIS Energy Transfer tab was not being destructed because the presenter was being held as a raw pointer. This meant that the when a working changes in the ADS, the OutputOptions held by the presenter were trying to update the widget in the previously deleted interface. The solution was to use a unique_ptr to hold the presenters for the Data Reduction interface.
This PR does two additional things:
OutputOptionsPresenter
uses the ADSObserver class rather than implementing Poco observers itself. This is clearer to read, and ensures the same presenter does not subscribe to a poco observer more than once (this can cause issues as seen previously in Fix crash due to subscribing observer twice to notification center #37074Fixes #37409
To test:
This does not require release notes because I believe this was introduced recently when IETPresenter was made to be qt-independent
Reviewer
Please comment on the points listed below (full description).
Your comments will be used as part of the gatekeeper process, so please comment clearly on what you have checked during your review. If changes are made to the PR during the review process then your final comment will be the most important for gatekeepers. In this comment you should make it clear why any earlier review is still valid, or confirm that all requested changes have been addressed.
Code Review
Functional Tests
Does everything look good? Mark the review as Approve. A member of
@mantidproject/gatekeepers
will take care of it.Gatekeeper
If you need to request changes to a PR then please add a comment and set the review status to "Request changes". This will stop the PR from showing up in the list for other gatekeepers.