Skip to content
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

Unable to use Visual Studio with NVDA: NVDA continuously keeps on reading whole window content #14086

Closed
akash07k opened this issue Aug 30, 2022 · 53 comments
Assignees
Labels
app/visual-studio blocked/needs-technical-investigation Issue is blocked. A technical investigation is required to progress the issue.

Comments

@akash07k
Copy link

Steps to reproduce:

  1. Update to latest NVDA Alpha
  2. Open Visual Studio 2022 or Visual Studio Installer.
  3. Observe.
  4. Press tab or any other navigation key.
  5. Observe

Actual behavior:

NVDA continuously keeps on announcing whole window content inside Visual Studio and we are unable to use it since the announcement doesn't get interrupt even if we manually navigate.
seems that this issue is started appearing after merging these PRs:
#14067
#14080
Speech output below:

Microsoft Visual Studio Community 2022
Microsoft Visual Studio Int Preview  window
Microsoft Visual Studio Int Preview 
Minimize 
Restore Down 
Close 
blank
Visual Studio2022 
Visual Studio 
2022 
Recent projects 
Open recent 
Open _recent 
blank
blank
blank
Open recent 
Get started 
blank
Start learning 
blank
Start learning 
Learn the basics of Visual Studio by making an ASP.NET Core app 
Clone a repository 
blank
_Clone a repository 
Get code from an online repository like GitHub or Azure DevOps 
Open a project or solution 
blank
Open a _project or solution 
Open a local Visual Studio project or .sln file 
Open a local folder 
blank
Open a local _folder 
Navigate and edit code within any folder 
Create a new project 
blank
Create a _new project 
Choose a project template with code scaffolding to get started 
blank
blank
blank
blank
blank
blank
blank
Continue without code 
Continue without code 
Continue _without code 
Continue _without code 
Continue without code 
blank
Microsoft Visual Studio Int Preview 
Microsoft Visual Studio Int Preview 
Recent projects 
_Search recent (Alt+S) 
_Search recent (Alt+S) 
_Search recent (Alt+S) 
_Search recent (Alt+S) 
Search 
Drop Down 
Search Control 
Search Control 
Today 
ConsoleApp1.sln 
ConsoleApp1.sln C:\Users\v-akkak\source\repos\ConsoleApp1 
blank
ConsoleApp1.sln C:\Users\v-akkak\source\repos\ConsoleApp1 
ConsoleApp1.sln C:\Users\v-akkak\source\repos\ConsoleApp1 
ConsoleApp1.sln C:\Users\v-akkak\source\repos\ConsoleApp1 
ConsoleApp1.sln C:\Users\v-akkak\source\repos\ConsoleApp1 
ConsoleApp1.sln C:\Users\v-akkak\source\repos\ConsoleApp1 
ConsoleApp1.sln C:\Users\v-akkak\source\repos\ConsoleApp1 
Search Control  grouping  collapsed
_Search recent (Alt+S)  edit  blank
No supported apps in use for mic mute
Open recent  list
Today  grouping  expanded  1 of 1
Start learning  button
Clone a repository  button  C
Open a project or solution  button  P
Open a local folder  button  F
Create a new project  button  N
blank
blank
Create a new project 
blank
_Recent project templates 
_Recent project templates 
_Recent project templates 
blank
blank
_Recent project templates 
blank
blank
LanguageFilter 
PlatformFilter 
ProjectTypeFilter 
Project Templates 
_Back 
_Next 
Search Control 
_Search for templates (Alt+S) 
_Search for templates (Alt+S) 
_Search for templates (Alt+S) 
_Search for templates (Alt+S) 
Search 
Drop Down 
Search Control 
Search Control 
Microsoft Visual Studio Int Preview  window
JavaScript Express Application 
blank
JavaScript Express Application 
A basic JavaScript Express application template which is bootstrapped by running your global install of npx and npm. 
blank
JavaScript 
blank
Web 
JavaScript Express Application 
JavaScript Express Application 
Echo Bot (Bot Framework v4 - .NET Core 3.1) 
blank
Echo Bot (Bot Framework v4 - .NET Core 3.1) 
Echo Bot Template for Bot Framework v4.  A good template if you want a little more than "Hello World!".  Echo Bot simply "echoes" back to the user anything the user says to the bot. 
blank
C# 
blank
Windows 
blank
macOS 
blank
Linux 
blank
AI Bots 
Echo Bot (Bot Framework v4 - .NET Core 3.1) 
Echo Bot (Bot Framework v4 - .NET Core 3.1) 
Core Bot (Bot Framework v4 - .NET Core 3.1) 
blank
Core Bot (Bot Framework v4 - .NET Core 3.1) 
Core Bot Template for Bot Framework v4.  Our most feature rich template, it shows how to use LUIS and multi-turn conversational patterns. 
blank
C# 
blank
Windows 
blank
macOS 
blank
Linux 
blank
AI Bots 
Core Bot (Bot Framework v4 - .NET Core 3.1) 
Core Bot (Bot Framework v4 - .NET Core 3.1) 
Core Bot with Tests (Bot Framework v4 - .NET 6.0) 
blank
Core Bot with Tests (Bot Framework v4 - .NET 6.0) 
Core Bot Template with Unit Tests for Bot Framework v4.  Same features as Core Bot, plus a full unit test project. 
blank
C# 
blank
Windows 
blank
macOS 
blank
Linux 
blank
AI Bots 
Core Bot with Tests (Bot Framework v4 - .NET 6.0) 
Core Bot with Tests (Bot Framework v4 - .NET 6.0) 
Empty Bot (Bot Framework v4 - .NET Core 3.1) 
blank
Empty Bot (Bot Framework v4 - .NET Core 3.1) 
Empty Bot Template for Bot Framework v4.  A good template if you want a skeleton project or want to take sample code from the documentation and paste it into a minimal bot in order to learn. 
blank
C# 
blank
Windows 
blank
macOS 
blank
Linux 
blank
AI Bots 
Empty Bot (Bot Framework v4 - .NET Core 3.1) 
Empty Bot (Bot Framework v4 - .NET Core 3.1) 
Android Wear Application 
blank
Android Wear Application 
A project for creating a .NET Android Wear application 
blank
C# 
blank
Android 
blank
Mobile 
Android Wear Application 
Android Wear Application 
Console App 
blank
Console App 
A project for creating a command-line application that can run on .NET on Windows, Linux and macOS 
blank
C# 
blank
Linux 
blank
macOS 
blank
Windows 
blank
Console 
Console App 
Console App is unpinned 
blank
blank
blank
blank
C# 
blank
blank
ASP.NET Core Web App 
blank
ASP.NET Core Web App 
A project template for creating an ASP.NET Core application with example ASP.NET Razor Pages content. 
blank
C# 
blank
Linux 
blank
macOS 
blank
Windows 
blank
Cloud 
blank
Service 
blank
Web 
ASP.NET Core Web App 
OBS 27.2.4 (64-bit, windows) - Portable Mode - Profile: Untitled - Scenes: Untitled  window
Controls  window
Start Recording  check box  not checked
Issues · nvaccess/nvda - Brave  row 1  column 2  2 of 3
NVDA Speech Viewer  row 1  column 3  3 of 3

Expected behavior:

NVDA shouldn't read whole window content automatically

NVDA logs, crash dumps and other attachments:

Please check attached recording too

System configuration

NVDA installed/portable/running from source:

Installed

NVDA version:

NVDA version alpha-26412,28b47560

Windows version:

Windows 11 (10.0.25188.0)

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

Visual Studio 2022

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.

It was fine with 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

2022-08-30.11-37-47.mp4
@cary-rowen

This comment was marked as outdated.

@cary-rowen
Copy link
Contributor

No, I may have to retract my comment because I had a problem with this in the WPF form designer, NVDA kept reporting "default".
and the issue appeared in alpha-26387,
Check the following configurations in the NVDA Advanced Settings panel: Registration for UI Automation events and property changes: Automatic (prefer selectively)

Below is the log:
nvda-alpha-26387.txt

@cary-rowen
Copy link
Contributor

cc @codeofdusk @josephsl

@akash07k
Copy link
Author

akash07k commented Aug 30, 2022 via email

@akash07k
Copy link
Author

akash07k commented Aug 30, 2022 via email

@josephsl
Copy link
Collaborator

Hi,

Looks like an event flood to me. Can you try:

  1. Install Event Tracker add-on.
  2. Restart NVDA with debug logging enabled.
  3. Open Visual Studio and repeat the steps noted in the original comment.
  4. Open log viewer, copy log fragments relevant to Visual Studio (this will include Event Tracker output), and paste it as an attachment or an issue comment.

Note that I cannot reproduce this from VS startup screen (the one described in the original comment (I'm using alpha.26412 myself). Since my UIA item status event handler could be involved, I'll keep an eye on this issue.

Thanks.

@akash07k
Copy link
Author

@josephsl sure, I'll come back with the results

@akash07k
Copy link
Author

I suspect that it only happens if we choose "global" from UI Automation Registration combobox

@akash07k
Copy link
Author

Yes, it is an event flud.
Happens only if we select "Global"

@cary-rowen
Copy link
Contributor

When i choose "automatically" it will happen

@josephsl
Copy link
Collaborator

josephsl commented Aug 30, 2022 via email

@akash07k
Copy link
Author

@josephsl
I think it would be better if Microsoft can fix it themselves in Visual Studio itself, but I don't think that they will be willing to take it up.
Even better, if this event storm can be fixed in VS itself, then it will improve the performance with screen readers a lot

@akash07k
Copy link
Author

@cary-rowen yes, with me too, if I choose automatically, it starts happening.

@codeofdusk
Copy link
Contributor

I think it would be better if Microsoft can fix it themselves in Visual Studio itself

Yes. CC @rperez030.

@akash07k
Copy link
Author

@codeofdusk Thanks for CCIng @rperez030
I really beg for fixing this.
I'm plagued by this performance hit with VS since many years.

@feerrenrut
Copy link
Contributor

@akash07k can you confirm if there is an acceptable workaround?
@josephsl do you have enough information to confirm the cause of this issue?
Is this this a regression?

@akash07k
Copy link
Author

akash07k commented Sep 1, 2022

@feerrenrut As of now, the only workaround to bypass this issue is to select "Selectively" from "Registration for UI Automation events and property changes"
However, I feel that this workaround is not that optimul and the issue should be fixed both at NVDA's side as well as Visual Studio should stop the event fludding.
If Microsoft fixes the event fludding in Visual Studio, then it will be a best fix for everybody and screen reader side tinkering won't be required.

@codeofdusk
Copy link
Contributor

@feerrenrut As of now, the only workaround to bypass this issue is to select "Selectively" from "Registration for UI Automation events and property changes"

This is default on SV2+, see #14018.

If #14080 is indeed the cause, maybe it could be restricted to SV2+ as well?

@akash07k
Copy link
Author

akash07k commented Sep 1, 2022

@feerrenrut in my opinion we should approach Microsoft and make then understand that how severe event fludding is. they should take it on priority

@akash07k
Copy link
Author

akash07k commented Sep 1, 2022

@codeofdusk Actually with me it happens if I choose "Automatic (Selective preferred" option. I think that it still prefers global registration

@seanbudd seanbudd self-assigned this Sep 2, 2022
@codeofdusk
Copy link
Contributor

@akash07k What do the following lines in the NVDA Python console return on your system?

import UIAHandler
UIAHandler.utils._shouldSelectivelyRegister()

@seanbudd
Copy link
Member

seanbudd commented Sep 9, 2022

Has this been reported to Microsoft yet?

@michaelDCurran michaelDCurran added the blocked/needs-technical-investigation Issue is blocked. A technical investigation is required to progress the issue. label Sep 9, 2022
@michaelDCurran michaelDCurran self-assigned this Sep 9, 2022
@codeofdusk
Copy link
Contributor

codeofdusk commented Sep 9, 2022

Has this been reported to Microsoft yet?

Not to my knowledge (unless @akash07k filed), but I'll see if I can flag it internally.

@rperez030
Copy link

Thanks for looping me in. @codeofdusk have you been able to reproduce the issue. I cannot. I'm running the latest build from the preview channel and manually set selective registration to global. @akash07k would you mind sharing the log showing that flood of events? You can send it to robertoperez@microsoft.com if you don't want to post it here. We are currently investigating what may be a related issue, and that would be very helpful in resolving this.

@akash07k
Copy link
Author

akash07k commented Sep 9, 2022 via email

@rperez030
Copy link

Ok, let's connect on Monday. I am in US eastern time.

@cary-rowen
Copy link
Contributor

Hi,
Using NVDA alpha-26524,bc1f92f9 With global UIA registration in NvDA.
I can still reproduce, I hear "default" several times for each tab key press in the form designer.
Note that I can only reproduce this in a WPF project not WinForm.

  • Windows 10 21H2 (x64) build 19044.1889
  • Microsoft Visual Studio Community 2022
  • version 17.3.3
  • VisualStudio.17.Release/17.3.3+32825.248
    Below is my nvda log:
    nvda.log

@cary-rowen
Copy link
Contributor

Hi, @josephsl
I followed your steps with a full log

  1. Install Event Tracker add-on.
  2. Restart NVDA with debug logging enabled.
  3. Open Visual Studio and repeat the steps noted in the original comment.
  4. Open log viewer, copy log fragments relevant to Visual Studio (this will include Event Tracker output), and paste it as an attachment or an issue comment.

Below is the log attachment, it has no privacy and I don't care:
nvda_Log_With_EventTracker.log

@michaelDCurran
Copy link
Member

I think that @akash07k and @cary-rowen might be talking about different things.
@cary-rowen is talking about hearing the word "default" a lot in designer. Perhaps this was due to NVDA now handling itemStatus property changed event, pr #14080
From what I can read, this new code is not limited to the current focus, so would report any changed item status on any element... That may be over kill.
@akash07k is experiencing a much more broad problem where entire VS windows are being reported. It could also be related to itemStatus property change event, but since others cannot reproduce this that is difficult to verify.
We need a detailed event log also from @akash07k

@josephsl
Copy link
Collaborator

josephsl commented Sep 12, 2022 via email

@cary-rowen
Copy link
Contributor

Hi @josephsl
My second log was saved after installing EventTracker and it should contain the information you need.
Thanks

@josephsl
Copy link
Collaborator

josephsl commented Sep 12, 2022 via email

@akash07k
Copy link
Author

@michaelDCurran I'll generate the logs,

@seanbudd
Copy link
Member

@akash07k @cary-rowen does this PR build from #14136, fix your respective issues?

@cary-rowen - I expect this PR to resolve the problem you describe
@akash07k - it would be helpful to know as well, but I don't expect this build to solve the problem

@cary-rowen
Copy link
Contributor

看上去,您提供的构建并没有解决我提到的问题。
NVDA is still announcing some redundant information, not just "default".
Below is the log after installing the EventTracker add-on.
nvda-log.txt

@michaelDCurran
Copy link
Member

@cary-rowen Is this extra info being spoken only happening in alphas, or has this always occurred? Right now we are only concerned with a regression in alpha which could be holding back 2022.4.

@cary-rowen
Copy link
Contributor

Hi, @michaelDCurran
The issue appeared in alpha-26387 and later

@codeofdusk
Copy link
Contributor

That's... quite odd.

Maybe we should add VS to the textChange whitelist?

seanbudd added a commit that referenced this issue Sep 14, 2022
…atus property event (#14080)" (#14136)

This reverts commit a4644ef.

This reverts commit a4644ef.

Link to issue number:
reverts #14080
re-opens #13973

Summary of the issue:
Based on discussion in #14086 (comment), it appears that #14080 makes the behaviour worse when using WPF projects in VS.

Description of user facing changes
#13973 is now an issue again

Description of development approach
reverts #14080
@cary-rowen
Copy link
Contributor

After making the following settings in the NVDA Advanced Settings panel:
Registration for UI Automation events and property changes:

"Global" or "Automatic (prefer selective)"

NVDA's speech lag more than five seconds in WPF project in VS2022.
Duplicate reporting of 'default' has been fixed in alpha-26572.
But we still can't work with VS in this case due to huge speech lag.

@codeofdusk
Copy link
Contributor

NVDA's speech lag more than five seconds in WPF project in VS2022.

@cary-rowen Is this lag also observed in NVDA 2022.3?

@cary-rowen
Copy link
Contributor

@codeofdusk
Yes, 2022.3Beta4 will also present this speech lag if the "Enable selective registration for UI Automation events and property changes" checkbox is not checked.

@codeofdusk
Copy link
Contributor

Yes, 2022.3Beta4 will also present this speech lag if the "Enable selective registration for UI Automation events and property changes" checkbox is not checked.

This is expected behaviour (see #11002). Selective UIA registration is now enabled by default as of NVDA 2022.4+ on Windows SV2+.

Given that the original issue reported here was fixed in PR #14136 and there are no further regressions, I recommend closing this issue.

@josephsl
Copy link
Collaborator

josephsl commented Sep 14, 2022 via email

@cary-rowen
Copy link
Contributor

But another thing I've observed is that I can also reproduce this huge speech lag by checking "Automatic (prefer selective" in the advanced settings panel.
Is this also expected?
If so, what is the default state of NVDA for this setting on Windows 10 21H2 (x64) build 19044.1889?

@codeofdusk
Copy link
Contributor

But another thing I've observed is that I can also reproduce this huge speech lag by checking "Automatic (prefer selective" in the advanced settings panel.
Is this also expected?

Yes if running on a Windows version below SV2.

what is the default state of NVDA for this setting on Windows 10 21H2 (x64) build 19044.1889?

The "automatic" option is global on Win10 due to bugs with task manager and emoji panel.

@michaelDCurran
Copy link
Member

michaelDCurran commented Sep 14, 2022 via email

@codeofdusk
Copy link
Contributor

But to clarify, NVDA 2022.2also would show this lag in VS right?

Yes, I'd think so.

this lag has not been introduced into NVDA knowingly but then only
mitigated on Windows 11 22h2 with selective registration?

To my knowledge.

We want to switch to UIA selective registration by default everywhere,
but we simply cannot on versions less Windows 11 22h2 as it would cause
missing information.

Correct.

@seanbudd
Copy link
Member

@akash07k - We're closing this as we believe this is resolved, please correct us if this is not the case and we will reopen the issue

@akash07k
Copy link
Author

akash07k commented Sep 15, 2022 via email

@akash07k
Copy link
Author

akash07k commented Oct 11, 2022 via email

@seanbudd
Copy link
Member

@akash07k - to be clear, is this still an issue with NVDA alpha?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app/visual-studio blocked/needs-technical-investigation Issue is blocked. A technical investigation is required to progress the issue.
Projects
None yet
Development

No branches or pull requests

8 participants