Skip to content

Fix possible freeze related to custom checklistboxes#9224

Merged
feerrenrut merged 2 commits into
nvaccess:masterfrom
BabbageCom:accPropServerFix
Feb 1, 2019
Merged

Fix possible freeze related to custom checklistboxes#9224
feerrenrut merged 2 commits into
nvaccess:masterfrom
BabbageCom:accPropServerFix

Conversation

@LeonarddeR

Copy link
Copy Markdown
Collaborator

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:

@LeonarddeR LeonarddeR requested a review from feerrenrut February 1, 2019 06:58

@feerrenrut feerrenrut left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good idea. Overall it looks really good.

Comment thread source/gui/accPropServer.py Outdated
@abstractproperty
def properties(self):
""" Returns an array of properties that should be handled by this instance.
@rtype: L{comtypes.GUID}*n

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the *n at the end of this line?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 feerrenrut merged commit 10590c8 into nvaccess:master Feb 1, 2019
@nvaccessAuto nvaccessAuto added this to the 2019.1 milestone Feb 1, 2019
@LeonarddeR LeonarddeR added the BabbageWork Pull requests filed on behalf of Babbage B.V. label Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BabbageWork Pull requests filed on behalf of Babbage B.V.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Problem with gui.nvdaControls.CustomCheckListBox

3 participants