UIA in conhost: issues with visible ranges #7572

Closed
opened 2026-01-31 01:07:34 +00:00 by claunia · 9 comments
Owner

Originally created by @codeofdusk on GitHub (Apr 23, 2020).

Originally assigned to: @carlos-zamora on GitHub.

Environment

Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd] next (19613.1000).
Windows Terminal version (if applicable): Inbox console

Any other software? NVDA

Steps to reproduce

  1. Download this list of domains.

  2. Start Windows Console and NVDA (with UIA in Windows Console enabled in advanced preferences).

  3. Run a python interpreter: python.

  4. Run:

    fin=open("domains.txt")
    fin.readlines()

Expected behaviour

Like in pre-21H1 conhost and Windows Terminal 0.11, NVDA reads current output immediately.

Actual behaviour

At this point, NVDA's auto-read lags far behind the actual output in the buffer. Quitting Python with quit() continues reading very old output.

Context

When a text change event is received, NVDA takes a diff of the old and new text and reads only the changed portion of the text. Maybe there's a bug in our diffing algorithm (implemented here, in LiveText._calculateNewText)?

Originally created by @codeofdusk on GitHub (Apr 23, 2020). Originally assigned to: @carlos-zamora on GitHub. <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd] next (19613.1000). Windows Terminal version (if applicable): Inbox console Any other software? NVDA ``` # Steps to reproduce <!-- A description of how to trigger this bug. --> 1. Download [this list of domains](https://github.com/microsoft/terminal/files/4519753/domains.txt). 2. Start Windows Console and NVDA (with UIA in Windows Console enabled in advanced preferences). 3. Run a python interpreter: `python`. 4. Run: fin=open("domains.txt") fin.readlines() # Expected behaviour <!-- What's actually happening? --> Like in pre-21H1 conhost and Windows Terminal 0.11, NVDA reads current output immediately. # Actual behaviour <!-- A description of what you're expecting, possibly containing screenshots or reference material. --> At this point, NVDA's auto-read lags far behind the actual output in the buffer. Quitting Python with `quit()` continues reading very old output. # Context When a text change event is received, NVDA takes a diff of the old and new text and reads only the changed portion of the text. Maybe there's a bug in our diffing algorithm (implemented [here](https://github.com/nvaccess/nvda/blob/master/source/NVDAObjects/behaviors.py), in `LiveText._calculateNewText`)?
claunia added the Product-ConhostIssue-BugNeeds-Tag-FixArea-Accessibility labels 2026-01-31 01:07:34 +00:00
Author
Owner

@codeofdusk commented on GitHub (Apr 23, 2020):

Cc @carlos-zamora.

@codeofdusk commented on GitHub (Apr 23, 2020): Cc @carlos-zamora.
Author
Owner

@codeofdusk commented on GitHub (Apr 29, 2020):

Do you still intend to look at this for 21H1? It would mean a lot for NVDA. Thanks!

@codeofdusk commented on GitHub (Apr 29, 2020): Do you still intend to look at this for 21H1? It would mean a lot for NVDA. Thanks!
Author
Owner

@codeofdusk commented on GitHub (Apr 29, 2020):

This bug is not reproducible in Windows Terminal but it is in Conhost.

@codeofdusk commented on GitHub (Apr 29, 2020): This bug is not reproducible in Windows Terminal but it is in Conhost.
Author
Owner

@carlos-zamora commented on GitHub (Apr 29, 2020):

@codeofdusk Yup! At least for now, we're hoping to get this in for 21H1. Just a bit caught up with stabilizing the last bit of Windows Terminal at the moment, so some of these ConHost bugs are lower priority.

@carlos-zamora commented on GitHub (Apr 29, 2020): @codeofdusk Yup! At least for now, we're hoping to get this in for 21H1. Just a bit caught up with stabilizing the last bit of Windows Terminal at the moment, so some of these ConHost bugs are lower priority.
Author
Owner

@codeofdusk commented on GitHub (Jun 5, 2020):

@carlos-zamora Any updates on this one?

@codeofdusk commented on GitHub (Jun 5, 2020): @carlos-zamora Any updates on this one?
Author
Owner

@carlos-zamora commented on GitHub (Jun 5, 2020):

@carlos-zamora Carlos Zamora FTE Any updates on this one?

Haven't had a chance to look at this one. We're prioritizing some other work right now. I'll be sure to get to this when we start working on ConHost issues though.

@carlos-zamora commented on GitHub (Jun 5, 2020): > @carlos-zamora Carlos Zamora FTE Any updates on this one? Haven't had a chance to look at this one. We're prioritizing some other work right now. I'll be sure to get to this when we start working on ConHost issues though.
Author
Owner

@codeofdusk commented on GitHub (Jul 8, 2020):

Do you still plan to get to this for 30 July (21H1)? For context, it's probably the single biggest issue blocking NVDA from using UIA in conhost.

@codeofdusk commented on GitHub (Jul 8, 2020): Do you still plan to get to this for 30 July (21H1)? For context, it's probably the single biggest issue blocking NVDA from using UIA in conhost.
Author
Owner

@codeofdusk commented on GitHub (Aug 16, 2020):

Turns out this particular case is due to NVDA's diffing algorithm. Sorry!

@codeofdusk commented on GitHub (Aug 16, 2020): Turns out this particular case is due to NVDA's diffing algorithm. Sorry!
Author
Owner

@codeofdusk commented on GitHub (Oct 4, 2020):

For future reference, this issue has nothing to do with visible ranges after all! See nvaccess/nvda#11639 for a description of the bug. Thanks @carlos-zamora for explaining the new behaviour of conhost and helping me track this down!

@codeofdusk commented on GitHub (Oct 4, 2020): For future reference, this issue has nothing to do with visible ranges after all! See nvaccess/nvda#11639 for a description of the bug. Thanks @carlos-zamora for explaining the new behaviour of conhost and helping me track this down!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#7572