nvaccess / nvda

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

Intellisense in Visual Studio 2022 version 17.12 is super laggy #17380

Closed towebo closed 1 week ago

towebo commented 1 week ago

Steps to reproduce:

  1. Start Visual Studio 2022, open a C# project and open a .cs file in the code editor.
  2. type the first letters of the name of an instance of an object and wait for NVDA to speak the suggestion.

Actual behavior:

It takes a very long time before the suggestion is spoken. On my system at least 10 seconds.

Expected behavior:

The suggestion should be spoken almost instantly, within a second. At least it does on another computer with Visual Studio 2022 Community Edition Version 17.11.5.

NVDA logs, crash dumps and other attachments:

The most frequent error in the log is: DEBUGWARNING - UIAHandler.UIAHandler.getNearestWindowHandle (17:55:29.990) - Dummy-2 (18840): error walking up to an element with a valid windowHandle Traceback (most recent call last): File "UIAHandler__init__.pyc", line 1338, in getNearestWindowHandle _ctypes.COMError: (-2147220991, 'En händelse kunde inte anropa en av prenumeranter.', (None, None, None, 0, None)) VS2022_Intellisense_issue.txt

System configuration

NVDA installed/portable/running from source:

Installed

NVDA version:

2024.4

Windows version:

Windows 10 Pro, 64-bit, Version 22H2 (OS-version 19045.5073)

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

Microsoft Visual Studio Community 2022 Version 17.12.0 Preview 5.0

Other information about your system:

Apple iMac with 32 GB RAM, 1 TB SSD, Intel Core i7-7700 CPU @ 3.60GHz

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.

Yes, 2023.3, exactly the same behavior.

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

cary-rowen commented 1 week ago

Is this a 17.12 specific issue, have you tried an older version of Visual Studio?

towebo commented 1 week ago

I tried 17.11.5 on my laptop and it was snappier so I installed 17.11.5 on my main computer too. It was as laggy as 17.12 so I inspected the logs and showed the same issue.

When I checked the log on my laptop (17.11.5) it did have almost the same problems but lacked the following:

It might be this problem that causes the most lag but it would be nice to get rid of the following too:

DEBUGWARNING - UIAHandler.UIAHandler.getNearestWindowHandle (17:55:29.990) - Dummy-2 (18840): error walking up to an element with a valid windowHandle Traceback (most recent call last): File "UIAHandler__init.pyc", line 1338, in getNearestWindowHandle _ctypes.COMError: (-2147220991, 'En händelse kunde inte anropa en av prenumeranter.', (None, None, None, 0, None)) error executing event: UIA_elementSelected on <NVDAObjects.Dynamic_IntelliSenseItemMenuItemUIA object at 0x0D577F30> with extra args of {} Traceback (most recent call last): File "eventHandler.pyc", line 353, in executeEvent File "eventHandler.pyc", line 119, in init File "eventHandler.pyc", line 128, in next File "NVDAObjects\UIA\VisualStudio.pyc", line 28, in event_UIA_elementSelected File "NVDAObjects__init.pyc", line 1201, in reportFocus File "speech\speech.pyc", line 791, in speakObject File "speech\speech.pyc", line 831, in getObjectSpeech File "speech\speech.pyc", line 682, in getObjectPropertiesSpeech File "baseObject.pyc", line 59, in get__ File "baseObject.pyc", line 167, in _getPropertyViaCache File "NVDAObjects\UIA\init.pyc", line 1921, in _get_states File "NVDAObjects\UIA\init__.pyc", line 1153, in _getUIACacheablePropertyValue _ctypes.COMError: (-2147220991, 'En händelse kunde inte anropa en av prenumeranter.', (None, None, None, 0, None))

towebo commented 1 week ago

Sorry, I just realized that I forgot to paste the first excerpt of the log. This is the one I think causes most lag because it only appears on my main computer that is really laggy in this situation:

DEBUGWARNING - UIAHandler.UIAHandler.getNearestWindowHandle (17:55:29.990) - Dummy-2 (18840): error walking up to an element with a valid windowHandle Traceback (most recent call last): File "UIAHandler__init__.pyc", line 1338, in getNearestWindowHandle _ctypes.COMError: (-2147220991, 'En händelse kunde inte anropa en av prenumeranter.', (None, None, None, 0, None))

DEBUGWARNING - UIAHandler.UIAHandler.getNearestWindowHandle (17:55:29.990) - Dummy-2 (18840): error walking up to an element with a valid windowHandle Traceback (most recent call last): File "UIAHandler__init__.pyc", line 1338, in getNearestWindowHandle _ctypes.COMError: (-2147220991, 'En händelse kunde inte anropa en av prenumeranter.', (None, None, None, 0, None))

cary-rowen commented 1 week ago

Hi @towebo Could you check the following options in the NVDA Advanced Settings panel? Remember to select the checkbox for "I understand that changing these settings may cause NVDA to function incorrectly" in the Advanced Settings panel. Then, check the option Registration for UI Automation events and property changes. For Windows 10 or earlier versions of Windows 11, I have this set to "Selective". Another setting, Use enhanced event processing (requires restart), should be set to "Enabled."

towebo commented 1 week ago

Thanks! You just saved me from buying a new computer! Ok, when I realized it wasn't my computer per say but NVDA I ditched the plans of a new computer.

Some weeks ago NVDA crashed and managed to kill my settings so I had to set it up as I want it but absolutely missed that one.

Perhaps the built in app module for Visual Studio should warn if this setting is wrong? I'll close this and suggest this with a new issue.