Skip to content

UIA freezes after a large number of events is received #11002

Description

@codeofdusk

Steps to reproduce:

  1. Enable "use UI Automation to access the Windows Console" from advanced preferences.

  2. Run cmd.

  3. Start a python interpreter: python.

  4. Run:

    for i in range(100000):
    print("test")

Actual behavior:

"test" is read for a few seconds, then all UIA applications become completely inaccessible until NVDA is restarted.

Expected behavior:

Output stops for a few seconds, then UIA recovers.

Context

I also tried disabling UIA connection recovery and event coalescing with the following in the NVDA Python console:

import UIAHandler
UIAHandler.handler.clientObject.CoalesceEvents = 0
UIAHandler.handler.clientObject.ConnectionRecoveryBehavior = 0

After UIA dies, running uiaHandler.terminate() and UIAHandler.initialize() does not restart UIA functionality. I'm not sure how to detect when UIA breaks or how to restart it once it does.

System configuration

NVDA installed/portable/running from source:

Installed and source.

NVDA version:

Latest master (b38776a).

Windows version:

Windows 10 21H1 insider.

Name and version of other software in use when reproducing the issue:

Windows Console

Other information about your system:

Other questions

Does the issue still occur after restarting your computer?

Yes.

Have you tried any other versions of NVDA? If so, please report their behaviors.

2019.2.1, 2019.3, 2020.1 (all same result).

If addons are disabled, is your problem still occuring?

Yes.

Did you try to run the COM registry fixing tool in NVDA menu / tools?

Not applicable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    api/uiaFeature or bug requires an understanding of UIAbug/app-freezep2https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priorityperformancetriagedHas been triaged, issue is waiting for implementation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions