Fix a rare infinite loop in IAccessibleHandler.findGroupboxObject.#11017
Merged
Conversation
Contributor
|
Hi, can this also resolve context menu closing bug seen with recent Edge releases if it turns out infinite loop is to blame? Thanks.
|
Contributor
Author
|
No idea.
|
Previously, when you opened the context menu for 1Password in the system notification area, NVDA froze. This occurred because: 1. 1Password sets focus to a window which is a child of HWND 65554, widow class "Message". I assume this is some sort of special system message-only window, but I can't find any details. 2. NVDA walked the focus ancestry, which involves calling IAccessibleHandler.findGroupboxObject on ancestors. 3. IAccessibleHandler.findGroupboxObject was thus called for this "Message" window. 4. IAccessibleHandler.findGroupboxObject looped through previous windows, but when you call getPreviousWindow for this window, it returns itself! 5. And thus an infinite loop ensues. To work around this, IAccessibleHandler.findGroupboxObject now ensures that the returned previous window is not the same as the window on which it was called.
d3e5553 to
ced1b1e
Compare
feerrenrut
approved these changes
Apr 17, 2020
Contributor
This PR doesn't fix this bug for me. |
Contributor
Author
|
The latest snapshot doesn't include this PR. It seems snapshot builds are
currently broken due to browser system test failures?
https://ci.appveyor.com/project/NVAccess/nvda/builds/32254149
|
Contributor
|
Oh sorry. I've just tested the build alpha-20009,56a62097. And it's perfect! :) |
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:
None.
Summary of the issue:
When you open the context menu for 1Password in the system notification area, NVDA freezes.
Description of how this pull request fixes the issue:
This occurs because:
To work around this, IAccessibleHandler.findGroupboxObject now ensures that the returned previous window is not the same as the window on which it was called.
Testing performed:
Opened the context menu for 1Password in the system notification area. Confirmed that the menu gets focus as expected and that NVDA doesn't freeze.
Known issues with pull request:
None.
Change log entry:
Bug fixes:
- NVDA no longer freezes when you open the context menu for 1Password in the system notification area.