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

Ignore redundant winEvents proxied from UIA on EXCEL7 windows #11818

Merged
merged 1 commit into from Nov 9, 2020

Conversation

michaelDCurran
Copy link
Member

Link to issue number:

None

Summary of the issue:

when the selection / focus moves between cells on an Excel sheet (EXCEL7 window), Excel's UI Automation implementation fires appropriate selection / focus events. Although there is separate work to support Excel in NvDA via UI automation, at the moment Excel is supported via its object model and MSAA. But, as Excel fires these UI Automation events, Windows proxies them to MSAA winEvents. Not only do we have no use for them as we handle selection / focus tracking in Excel cells entirely with the keyboard, these winEvents are broken in that trying to fetch an IAccessible object from them always fails, but more importantly, fetching, and checking if the winEvent should be dropped as it in deed did come from UIA causes a freeze of several seconds on some machines.

I am unable to reproduce the freeze myself, but can at least see the redundant events.

The user who reported this via email was running Windows 10.0.17763 and Office  365 MSO (16.0.11929.20966) 32-bit.

Description of how this pull request fixes the issue:

Simply ignore all winEvents from EXCEL7 windows with an objectID greater than 0 as these are all proxied from UI Automation and we do not expect or need them.
We actually only expect a focus winEvent when the sheet gets focus, and anything else is not expected as historically Excel never fired any more winEvents than that. Thus all the winEvents now coming from its UI Automation implementation are redundant and cause a performance hit.

Testing performed:

Tested Excel locally by moving selection / focus between cells with the arrow keys and made sure that NVDA still reported the cells.
Provided multiple try builds to the user to test, and they reported that the freezes disappeared for them.

Known issues with pull request:

None.

Change log entry:

Bug fixes:

  • A freeze of several seconds experienced by a small amount of users when arrowing between cells in Excel should no longer occur.

…e generated by UI Automation and can freeze NVDA on some systems.
Copy link
Collaborator

@leonardder leonardder left a comment

Choose a reason for hiding this comment

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

Aren't these supposed to be dropped by us changing the UIA proxy factory mapping to ignore proxied win events?events prox

@michaelDCurran
Copy link
Member Author

michaelDCurran commented Nov 9, 2020 via email

@leonardder
Copy link
Collaborator

leonardder commented Nov 9, 2020 via email

@michaelDCurran michaelDCurran merged commit 18572e4 into master Nov 9, 2020
1 check passed
@michaelDCurran michaelDCurran deleted the excel_ignoreWinEventsFromUIA branch November 9, 2020 22:19
@nvaccessAuto nvaccessAuto added this to the 2020.4 milestone Nov 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants