Skip to content
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 a rare infinite loop in IAccessibleHandler.findGroupboxObject. #11017

Merged
merged 1 commit into from Apr 17, 2020

Commits on Apr 17, 2020

  1. Fix a rare infinite loop in IAccessibleHandler.findGroupboxObject.

    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.
    jcsteh committed Apr 17, 2020
    Copy the full SHA
    ced1b1e View commit details
    Browse the repository at this point in the history