nvaccess / nvda

NVDA, the free and open source Screen Reader for Microsoft Windows
https://www.nvaccess.org/
Other
2.11k stars 637 forks source link

In PowerShell consoles NVDA crashes and destroys the console window #15786

Open cyrmax opened 12 months ago

cyrmax commented 12 months ago

Steps to reproduce:

Actual behavior:

NVDA sometimes crashes and destroys the console window, disconnecting you from SSh or breaking any other important interraction. Sometimes it just plays an error sound and closes the window but sometimes NVDA completely hangs and needs to be restarted. Playing with parameters in advanced settings gives no effect.

Expected behavior:

NVDA should not crash and of course should not destroy console window. In general NVDA instability in consoles with lots of fast output is a very old, critical and huge problem that really needs to be solved somehow.

NVDA logs, crash dumps and other attachments:

NVDA old log is recorded with lots of very fast output from console. nvda-old.log NVDA log and NVDA log 2 were recorded without full NVDA crash but immediately after an error in console and after that NVDA destroyed the console window. nvda.log nvda2.log

System configuration

NVDA installed/portable/running from source:

Installed.

NVDA version:

Version: alpha-29959,10427e3f (2024.1.0.29959)

Windows version:

Windows 10 22H2 (AMD64) build 19045.3636

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

PowerShell, OpenSSH.

Other information about your system:

N/A.

Other questions

Does the issue still occur after restarting your computer?

Yes. Even on a completely new computer and new system.

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

Yes. This problem exists since NVDA 2021 or even earlier. But window destroy situations become more often in NVDA 2023.3.

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.

cyrmax commented 12 months ago

For me this issue today resulted in a bunch of serious problems when upgrading software on my server. I spent about three hours to recover server stability after sudden disconnect which was caused by NVDA error.

cyrmax commented 12 months ago

Update: just now NVDA crashed in the following situation: I had a full screen of log entries in console. I typed clear and pressed enter. Immediately after that NVDA played an error sound and killed the console window. Here is another log: nvda-after-clear.log

beqabeqa473 commented 12 months ago

I observed the same situation when using UIA in console.

Do you use windows terminal? What do you have selected as an option in advanced settings? as a workarround, you could select legacy in that choice and use conhost. However, it is really irritating and makes this hard, because because of that i was forced to use screen everytime i use ssh, however not only ssh session was a cause. As additional note, i would say, that i am not able to reproduce this on windows 11, however due to a high amount of people using windows 10, this issue should not be left unresolved.

On 11/16/23, Kirill Belousov @.***> wrote:

Update: just now NVDA crashed in the following situation: I had a full screen of log entries in console. I typed clear and pressed enter. Immediately after that NVDA played an error sound and killed the console window. Here is another log: nvda-after-clear.log

-- Reply to this email directly or view it on GitHub: https://github.com/nvaccess/nvda/issues/15786#issuecomment-1813575195 You are receiving this because you are subscribed to this 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

XLTechie commented 12 months ago

@cyrmax If you were connecting to Linux, or any Unix-derived server:

When connecting any ssh session where critical things will be done, you may consider starting the "screen" program, and doing your work inside its shell.

If you get disconnected, when you next connect, type "screen -Dr", and you should be right back where you left off.

As a side benefit, you can spawn multiple shell "windows", and switch between them, so you may do several things at once.

This does not solve the NVDA problem, of course, but more than just NVDA can kill a terminal session.

XLTechie commented 12 months ago

CC @codeofdusk

cyrmax commented 11 months ago

@beqabeqa473 I use Windows 10 and do not use windows terminal. Switching from UIA to legacy has solved a part of problem, now window does not crash. But NVDA still crashes on large amount of output even with legacy mechanics. @XLTechie Yes, sure I know this aproach and from now always use screen to secure my work from sudden disconnect. But as you said of course this does not solve the NVDA problem and it should be fixed I think.

seanbudd commented 11 months ago

May be fixed by #14888

Adriani90 commented 11 months ago

@cyrmax, @beqabeqa473 are you able to reproduce this issue in the last NVDA alpha version containing the code from #14888?

beqabeqa473 commented 11 months ago

I am no longer using win10, so not able to test.

cyrmax commented 11 months ago

I have tested this new alpha:

  1. Windows Terminal + not flooding but frequently changing output - no crash;
  2. Windows Terminal + flooding the console with 2 mb of text - no crash but lags for 10 seconds reading some text and ignoring repeated ctrl presses;
  3. old Windows conhost.exe + not flooding but frequently changing text - no crash;
  4. conhost + flooding with same 2mb of text - lags more than for 10 seconds, but same as in 2;

But I have noticed one problem: After i flooded the console with two megabytes of plain text without any pager, just with cat something.log, after that, when i allready was working in another window, changing some console settings and not reading the terminal output I suddenly heard some lines of text like I am still reading the log output. It looks like some events were stuck in memory and played a minute after proper time. Also when these two or three lines of text were spoken, NVDA also ignored ctrl presses and lagged for a while. Here is the log if needed. nvda-testing-large-text-in-console.log

beqabeqa473 commented 11 months ago

In conhost, i am not able to see a problem with one of large project, which is built with cmake. Before it was freezes upto 10-20 seconds whole UIA stack, nothing was accessible at that time, notepad, start menu and other windows components which are using UIA was not read by NVDA.

On 11/27/23, Kirill Belousov @.***> wrote:

I have tested this new alpha:

  1. Windows Terminal + not flooding but frequently changing output - no crash;
  2. Windows Terminal + flooding the console with 2 mb of text - no crash but lags for 10 seconds reading some text and ignoring repeated ctrl presses;
  3. old Windows conhost.exe + not flooding but frequently changing text - no crash;
  4. conhost + flooding with same 2mb of text - lags more than for 10 seconds, but same as in 2;

But I have noticed one problem: After i flooded the console with two megabytes of plain text without any pager, just with cat something.log, after that, when i allready was working in another window, changing some console settings and not reading the terminal output I suddenly heard some lines of text like I am still reading the log output. It looks like some events were stuck in memory and played a minute after proper time. Also when these two or three lines of text were spoken, NVDA also ignored ctrl presses and lagged for a while. Here is the log if needed. nvda-testing-large-text-in-console.log

-- Reply to this email directly or view it on GitHub: https://github.com/nvaccess/nvda/issues/15786#issuecomment-1827595237 You are receiving this because you were mentioned.

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 commented 11 months ago

Unfortunately i cannot test with terminal, because i stopped using it because of large memory leaks.

On 11/27/23, Beqa Gozalishvili @.***> wrote:

In conhost, i am not able to see a problem with one of large project, which is built with cmake. Before it was freezes upto 10-20 seconds whole UIA stack, nothing was accessible at that time, notepad, start menu and other windows components which are using UIA was not read by NVDA.

On 11/27/23, Kirill Belousov @.***> wrote:

I have tested this new alpha:

  1. Windows Terminal + not flooding but frequently changing output - no crash;
  2. Windows Terminal + flooding the console with 2 mb of text - no crash but lags for 10 seconds reading some text and ignoring repeated ctrl presses;
  3. old Windows conhost.exe + not flooding but frequently changing text - no crash;
  4. conhost + flooding with same 2mb of text - lags more than for 10 seconds, but same as in 2;

But I have noticed one problem: After i flooded the console with two megabytes of plain text without any pager, just with cat something.log, after that, when i allready was working in another window, changing some console settings and not reading the terminal output I suddenly heard some lines of text like I am still reading the log output. It looks like some events were stuck in memory and played a minute after proper time. Also when these two or three lines of text were spoken, NVDA also ignored ctrl presses and lagged for a while. Here is the log if needed. nvda-testing-large-text-in-console.log

-- Reply to this email directly or view it on GitHub: https://github.com/nvaccess/nvda/issues/15786#issuecomment-1827595237 You are receiving this because you were mentioned.

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

-- 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

Adriani90 commented 8 months ago

@cyrmax could you please test with NVDA last alpha? #16168 might have had a positive effect on this.

seanbudd commented 6 months ago

The next steps to investigating this issue would be creating a crash dump from powershell using these steps. Once a crash dump is created we can debug the cause.

Adriani90 commented 3 months ago

@cyrmax are you still having this issue with NVDA 2024.3 Beta4?

SaschaCowley commented 2 months ago

@cyrmax are you still having this problem?