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
nvda logs a lot of '\r\n\r\n' if UIA support for Windows console is enabled #14689
Comments
According to your log, the spoken string is 18095 character long. And there are 17994 characters after the last '>', i.e. 8997 '\r\n'. @codeofdusk: any idea why so many new lines are captured in the command window when it becomes the foreground? |
This is a known bug in API level 0 consoles (see microsoft/terminal#6986). In consoles with less than API level 2, no support is provided as indicated in the user guide. Mitigation strategies:
@seanbudd I recommend closing as duplicate of microsoft/terminal#6986. CC @carlos-zamora, @DHowett. |
@codeofdusk This problem bothers me because of: ABuffEr/numberProcessing#4 But due to another issue, not forcing UIA support for Windows Console under Chinese operating systems will cause every Chinese character displayed on the screen to be reported twice by NVDA. |
If you can't upgrade, either use Windows Terminal ( |
Hi,
before the dictionaries loop, no freeze happens. But I doubt it would be considered an acceptable solution for a PR... |
@codeofdusk
Can you provide a link on how to do this? |
I've updated my console test package to the latest released build of OpenConsole. Hopefully this can provide a stopgap solution until you upgrade to SV2 or switch to |
@ABuffEr a fix similar to what you suggested is appropriate |
Ok, I'll provide a PR in next hours. |
… enabled (#14703) Fixes #14689 Summary of the issue: Due to a bug in API Level 0 and 1 consoles (see microsoft/terminal/#5243), sometimes NVDA freezes during dictionary processing of console text, containing a huge amount of blank lines. Description of user facing changes None. Description of development approach If current focus object has apiLevel 0 or 1, and difference between regular text and text with rightside blank lines stripped is greater than 100, we use cleaned text for dictionary processing.
… consoles (#14822) Fixes #14689 Summary of the issue: IMPROVED (apiLevel 1) and END_INCLUSIVE (apiLevel 0) UIA consoles produce a lot of blank lines (more than 17000) in some output, causing a NVDA freeze during speech dictionary processing. Description of user facing changes None. Description of development approach I added a _get_text method to ConsoleUIATextInfo class (for apiLevel 1 consoles), stripping all \r\n on the rightside of output from _get_text of superclass (implicitly used previously). For apiLevel 0 consoles (ConsoleUIATextInfoWorkaroundEndInclusive class), I simply considered that the _get_text already present calls _get_text from superclass, that is, ConsoleUIATextInfo, so text is already cleaned.
Steps to reproduce:
Actual behavior:
There are a lot of '\r\n' in the log.
Expected behavior:
There won't be so many '\r\n' in the log
NVDA logs, crash dumps and other attachments:
log.txt
System configuration
NVDA installed/portable/running from source:
Installed
NVDA version:
2023.1Beta2
Windows version:
Windows 10 22H2 (AMD64) build 19045.2604
Name and version of other software in use when reproducing the issue:
None
Other information about your system:
None
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.
2022.4 is the same
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
The text was updated successfully, but these errors were encountered: