Fix possible freeze related to custom checklistboxes#9224
Merged
Conversation
feerrenrut
suggested changes
Feb 1, 2019
feerrenrut
left a comment
Contributor
There was a problem hiding this comment.
This is a good idea. Overall it looks really good.
| @abstractproperty | ||
| def properties(self): | ||
| """ Returns an array of properties that should be handled by this instance. | ||
| @rtype: L{comtypes.GUID}*n |
Contributor
There was a problem hiding this comment.
What is the *n at the end of this line?
Collaborator
Author
There was a problem hiding this comment.
The number of items in the array. May be we should allow people to provide a tuple or list, and do de conversion to comtypes array ourselves. That might be less error prone.
Co-Authored-By: leonardder <leonardder@users.noreply.github.com>
feerrenrut
approved these changes
Feb 1, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
Fixes #8916
Summary of the issue:
gui.nvdaControls.CustomCheckListBox uses a custom AccPropServer for accessibility. However, when destroying the control, the AccPropServer isn't properly unregistered. This leads to unexpected behavior, sometimes even to system freezes, though I've not been able to reproduce these myself.
Description of how this pull request fixes the issue:
This has been fixed for gui.nvdaControls.AutoWidthColumnCheckListCtrl but not yet for the CustomListBox. Fixing this in a similar way would mean a whole lot of copied code. This pr actually fixes it for good, making the AccPropServer instance itself responsible for registration and unregistration.
Testing performed:
Tested by several people in #8916. The current code is rebased on master.
Known issues with pull request:
We could debate whether the server itself should be responsible for registration and unregistration. I think it makes sense, as every IAccPropServer_Impl will now automatically have the needed functionality to register, and more importantly, unregister itself.
Change log entry: