nvda icon indicating copy to clipboard operation
nvda copied to clipboard

UIA instabilities mostly in console windows

Open beqabeqa473 opened this issue 2 years ago • 16 comments

CC @michaelDCurran Instabilities with UIA implementation was discovered mostly when working in console windows, but it might also be reproduceable with other software implementing UIA. It is not fixed by #14888 and was also reproduceable before. Unfortunately git -P log -1000 doesn't cause this, seems it is not so fast to output stdout. For this cat should be available on system. Cat is usually installed with other unix tools when installing git for windows.

Steps to reproduce:

First problem: execute in NVDA repository git -P log -1000 > log.txt cat log.txt Second problem: execute in NVDA repository: git -P log -10000

Actual behavior:

For the first problem: UIA stops responding when outputting large amount of text with cat and on my machine NVDA stop reading everything related to UIA. After one to five minutes, everything gets back to normal state For the second problem: after outputting a large amount of text with git -P log -10000, if you weren't able to reproduce, run twice, NVDA stops reading of console output in any new or existing console windows. When restarting NVDA, there is no exit soundanymore.

Expected behavior:

UIA should be stable enough in NVDA to nott disturb user.

NVDA logs, crash dumps and other attachments:

No logs

System configuration

NVDA installed/portable/running from source:

Installed

NVDA version:

alpha-30120,8052b68f (2024.1.0.30120)

Windows version:

Windows 11 23H2 (AMD64) build 22631.2428

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

ConHost

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.

Reproduceable with all Previous versions.

If NVDA add-ons are disabled, is your problem still occurring?

Yes

Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?

Yes

beqabeqa473 avatar Nov 28 '23 18:11 beqabeqa473

About problem related to stop reading an output from console windows, it is %100 reproduceable when holding controll to stop speech untill output ends.

beqabeqa473 avatar Nov 28 '23 20:11 beqabeqa473

About problem related to stop reading an output from console windows, it is %100 reproduceable when holding controll to stop speech untill output ends.

I was also able to reproduce this.

Danstiv avatar Nov 28 '23 21:11 Danstiv

So just to confirm,

People on this issue are not noticing any improvement with the merging of #14888 at all? Or is this a very specific case?

When this does occur, can you still alt+tab to other applications? One goal of the pr was that at least these issues with consoles should not take out all UIA's focus tracking.

Message ID: @.***>

michaelDCurran avatar Nov 28 '23 21:11 michaelDCurran

If we are talking about first problem, no, Nothing is accessible related to UIA, task picker also is affected..

On 11/29/23, Michael Curran @.***> wrote:

So just to confirm,

People on this issue are not noticing any improvement with the merging of #14888 at all? Or is this a very specific case?

When this does occur, can you still alt+tab to other applications? One goal of the pr was that at least these issues with consoles should not take out all UIA's focus tracking.

Message ID: @.***>

-- Reply to this email directly or view it on GitHub: https://github.com/nvaccess/nvda/issues/15850#issuecomment-1830786942 You are receiving this because you authored the thread.

Message ID: @.***>

-- with best regards Beqa Gozalishvili Tell: +995593454005 Email: @.*** Web: https://gozaltech.org Skype: beqabeqa473 Telegram: https://t.me/gozaltech facebook: https://facebook.com/gozaltech twitter: https://twitter.com/beqabeqa473 Instagram: https://instagram.com/beqa.gozalishvili

beqabeqa473 avatar Nov 28 '23 21:11 beqabeqa473

cc: @codeofdusk

Adriani90 avatar Nov 28 '23 21:11 Adriani90

I can also confirm this. When this happens, UIA completely stops working at least for several minutes.

a11cf0 avatar Nov 29 '23 08:11 a11cf0

Yes. These issues have been known about for several years at least. PR #14888 tried to address some of these.

Are current NVDA alpha builds, better, the same, or worse, than NVDA 2023.3?

michaelDCurran avatar Nov 29 '23 08:11 michaelDCurran

For small amounts of texts, #14888 is better, but unfortunately, if we have to work with larger amounts than outlined in the description of #14888, we are experiencing these issues. As for stopping to read an output, i am experiencing it very often when building a project several times in one console session. These are examples to reliably reproduce described issues.

beqabeqa473 avatar Nov 29 '23 09:11 beqabeqa473

I also observed the same behavior with latest alpha. The strange thing is that I ran a build with an earlier version of PR #14888 and that seemed to have better performance and at least dod not drop all other UIA events. I was observing build output from a remote Linux machine in Windows console and could alt+tab to an Edge window that was playing a Youtube video. I knew the system was still responsive since I could control the Youtube video, but NVDA did not produce any output in speech or braille and only started working after minutes. Even then, some UIA events tseemed to be dropped and new output in the console was not announced.

bramd avatar Nov 29 '23 16:11 bramd

NVDA stops reading of console output in any new or existing console windows. When restarting NVDA, there is no exit soundanymore.

100% reproduceable on my machine with the following steps:

  1. Enable UIA windows console support.
  2. Select Diff Match Patch diff algorithm.
  3. Create text document with 👆 emoji or download test.txt.
  4. Open cmd in directory in which the file is saved.
  5. Execute chcp 65001
  6. Execute type test.txt

After this, the problem described above occurs.

This only happens when DMP plus UIA support is enabled. Also, after the emoji is outputted to the console, nvda_dmp.exe disappears from the task manager.

Danstiv avatar Dec 01 '23 12:12 Danstiv

CC @codeofdusk

Danstiv avatar Dec 01 '23 12:12 Danstiv

@bramd wrote:

I ran a build with an earlier version of PR #14888

Can you post the last commit of the PR you are running?

@Danstiv wrote:

Also, after the emoji is outputted to the console, nvda_dmp.exe disappears from the task manager.

cc: @josephsl maybe you can look into this?

Adriani90 avatar Dec 01 '23 14:12 Adriani90

Hi,

I cannot really look into this as NVDA dmp module is not really my area of expertise and to focus on school.

Thanks.

josephsl avatar Dec 01 '23 15:12 josephsl

Also, after the emoji is outputted to the console, nvda_dmp.exe disappears from the task manager.

I patched dmp a little and got the following:

Traceback (most recent call last):
  File "D:\dev\nvda\source\..\include\nvda_dmp\nvda_dmp.py", line 32, in <module>
    for op, text in diff(oldText, newText, counts_only=False):
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: String contains high-code-point characters that cannot be represented natively on this platform.

Danstiv avatar Dec 02 '23 14:12 Danstiv

Just for clarity, #14888 have noticeable positive impact, when using windows terminal with UIA notifications. So, it had problems with UIA enhanced processing turned off, and performance was drastically improved after turning it back on. Both of problems are not reproduceable with UIA notifications selected instead of diffing, however, UIA notifications are not implemented in conhost, and there we still have problems.

beqabeqa473 avatar Dec 02 '23 19:12 beqabeqa473

1

after outputting a large amount of text with git -P log -10000, if you weren't able to reproduce, run twice, NVDA stops reading of console output in any new or existing console windows.

2

Also, after the emoji is outputted to the console, nvda_dmp.exe disappears from the task manager.

Cannot reproduce with fast_diff_match_patch downgraded to diff_match_patch.

Danstiv avatar Dec 03 '23 18:12 Danstiv

@beqabeqa473 - can you please confirm this is fixed with the next alpha build created

seanbudd avatar May 09 '24 01:05 seanbudd