nvda icon indicating copy to clipboard operation
nvda copied to clipboard

Navigate to text styles in MS Outlook, NVDA throws key errors and freezes at least for 9 or 10 seconds for every key press

Open Adriani90 opened this issue 1 year ago • 6 comments

Steps to reproduce:

  1. Open NVDA
  2. Assign [ and shift+[ for different style navigation
  3. Assign ] and shift+] for same style navigation
  4. Open an Outlook email, see email attached, just remove the .zip characters at the end to open the email.
  5. Try both with UIA for MS Word enabled and disabled, this has also an effect on MS Outlook
  6. Press the assigned commands for navigating to next and previous text styles

Actual behavior:

NVDA often gives a key error when attempting to navigate to next or previous styles and freezes for at least 9 or 10 seconds for every key press from time to time.

IO - inputCore.InputManager.executeGesture (23:23:42.815) - winInputHook (22544):
Input: kb(laptop):ü
IO - speech.speech.speak (23:23:43.149) - MainThread (26044):
Speaking ['browser']
DEBUG - UIAHandler.shouldUseUIAInMSWord (23:23:43.169) - MainThread (26044):
User has requested UIA in MS Word always
IO - inputCore.InputManager.executeGesture (23:23:43.619) - winInputHook (22544):
Input: kb(laptop):ü
ERROR - scriptHandler.executeScript (23:23:43.819) - MainThread (26044):
error executing script: <bound method BrowseModeTreeInterceptor.addQuickNav.<locals>.<lambda> of <appModules.outlook.MailViewerTreeInterceptor object at 0x0A1DD1F0>> with gesture 'ü'
Traceback (most recent call last):
  File "scriptHandler.pyc", line 295, in executeScript
  File "browseMode.pyc", line 558, in <lambda>
  File "browseMode.pyc", line 516, in _quickNavScript
  File "browseMode.pyc", line 2447, in _iterTextStyle
  File "textInfos\__init__.pyc", line 793, in moveToCodepointOffset
RuntimeError: Unable to find desired offset in TextInfo.
IO - inputCore.InputManager.executeGesture (23:23:44.559) - winInputHook (22544):
Input: kb(laptop):plus
DEBUG - watchdog._waitUntilNormalCoreAliveTimeout (23:23:45.061) - watchdog (16804):
Potential freeze, waiting up to 10 seconds.
DEBUG - UIAHandler.shouldUseUIAInMSWord (23:23:45.236) - Dummy-1 (7700):
User has requested UIA in MS Word always
IO - inputCore.InputManager.executeGesture (23:23:46.574) - winInputHook (22544):
Input: kb(laptop):plus
DEBUGWARNING - NVDAObjects.window.winword.WordDocumentTextInfo._normalizeFormatField (23:23:53.007) - MainThread (26044):
highlight color error
Traceback (most recent call last):
  File "NVDAObjects\window\winword.pyc", line 956, in _normalizeFormatField
KeyError: 9999999
DEBUGWARNING - NVDAObjects.window.winword.WordDocumentTextInfo._normalizeFormatField (23:23:53.154) - MainThread (26044):
highlight color error
Traceback (most recent call last):
  File "NVDAObjects\window\winword.pyc", line 956, in _normalizeFormatField
KeyError: 9999999
DEBUG - UIAHandler.shouldUseUIAInMSWord (23:23:53.309) - Dummy-1 (7700):
User has requested UIA in MS Word always
IO - speech.speech.speak (23:23:53.309) - MainThread (26044):
Speaking ['No next same style text']
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible._getIA2RelationFirstTarget (23:23:53.309) - MainThread (26044):
Unable to use _getIA2TargetsForRelationsOfType, fallback to _IA2Relations.
DEBUG - NVDAObjects.IAccessible.IAccessible._get__IA2Relations (23:23:53.309) - MainThread (26044):
Not an IA2.IAccessible2
DEBUG - NVDAObjects.IAccessible.IAccessible._getIA2RelationFirstTarget (23:23:53.309) - MainThread (26044):
Unable to fetch _IA2Relations
Traceback (most recent call last):
  File "NVDAObjects\IAccessible\__init__.pyc", line 1635, in _getIA2RelationFirstTarget
  File "baseObject.pyc", line 62, in __get__
  File "baseObject.pyc", line 168, in _getPropertyViaCache
  File "NVDAObjects\IAccessible\__init__.pyc", line 1550, in _get__IA2Relations
NotImplementedError
DEBUG - watchdog._waitUntilNormalCoreAliveTimeout (23:23:53.571) - watchdog (16804):
Recovered from potential freeze after 9.00928640004713 seconds.
DEBUG - watchdog._waitUntilNormalCoreAliveTimeout (23:23:53.834) - watchdog (16804):
Potential freeze, waiting up to 10 seconds.
DEBUG - UIAHandler.shouldUseUIAInMSWord (23:23:54.010) - Dummy-1 (7700):
User has requested UIA in MS Word always
DEBUGWARNING - NVDAObjects.window.winword.WordDocumentTextInfo._normalizeFormatField (23:24:01.599) - MainThread (26044):
highlight color error
Traceback (most recent call last):
  File "NVDAObjects\window\winword.pyc", line 956, in _normalizeFormatField
KeyError: 9999999
DEBUGWARNING - NVDAObjects.window.winword.WordDocumentTextInfo._normalizeFormatField (23:24:01.789) - MainThread (26044):
highlight color error
Traceback (most recent call last):
  File "NVDAObjects\window\winword.pyc", line 956, in _normalizeFormatField
KeyError: 9999999
DEBUG - UIAHandler.shouldUseUIAInMSWord (23:24:01.969) - Dummy-1 (7700):
User has requested UIA in MS Word always
IO - speech.speech.speak (23:24:01.969) - MainThread (26044):
Speaking ['No next same style text']
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible._getIA2RelationFirstTarget (23:24:01.977) - MainThread (26044):
Unable to use _getIA2TargetsForRelationsOfType, fallback to _IA2Relations.
DEBUG - NVDAObjects.IAccessible.IAccessible._get__IA2Relations (23:24:01.977) - MainThread (26044):
Not an IA2.IAccessible2
DEBUG - NVDAObjects.IAccessible.IAccessible._getIA2RelationFirstTarget (23:24:01.977) - MainThread (26044):
Unable to fetch _IA2Relations
Traceback (most recent call last):
  File "NVDAObjects\IAccessible\__init__.pyc", line 1635, in _getIA2RelationFirstTarget
  File "baseObject.pyc", line 62, in __get__
  File "baseObject.pyc", line 168, in _getPropertyViaCache
  File "NVDAObjects\IAccessible\__init__.pyc", line 1550, in _get__IA2Relations
NotImplementedError
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible._getIA2RelationFirstTarget (23:24:01.979) - MainThread (26044):
Unable to use _getIA2TargetsForRelationsOfType, fallback to _IA2Relations.
DEBUG - NVDAObjects.IAccessible.IAccessible._get__IA2Relations (23:24:01.979) - MainThread (26044):
Not an IA2.IAccessible2
DEBUG - NVDAObjects.IAccessible.IAccessible._getIA2RelationFirstTarget (23:24:01.979) - MainThread (26044):
Unable to fetch _IA2Relations
Traceback (most recent call last):
  File "NVDAObjects\IAccessible\__init__.pyc", line 1635, in _getIA2RelationFirstTarget
  File "baseObject.pyc", line 62, in __get__
  File "baseObject.pyc", line 168, in _getPropertyViaCache
  File "NVDAObjects\IAccessible\__init__.pyc", line 1550, in _get__IA2Relations
NotImplementedError
DEBUG - watchdog._waitUntilNormalCoreAliveTimeout (23:24:02.343) - watchdog (16804):
Recovered from potential freeze after 9.008966000052169 seconds.

Webinar des Monats Förderung durch die öffentliche Hand.msg.zip

Expected behavior:

NVDA should report the next or the previous style text properly and should not freeze.

NVDA logs, crash dumps and other attachments:

n/a

System configuration

NVDA installed/portable/running from source:

Installed

NVDA version:

Version: alpha-31612,3d4aOa8f (2024.2.0.31612)

Windows version:

Windows 11 23 H2

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

Microsoft 365 MSO (Version 2403 Build 16.0.17425.20176) 64 Bit

Other information about your system:

n/a

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.

n/a

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

Adriani90 avatar Apr 16 '24 21:04 Adriani90

cc: @mltony

Adriani90 avatar Apr 16 '24 21:04 Adriani90

Small question @Adriani90 How did you assign same style navigation and different style navigation keys? I do not see entries for this in input gestures under settings.

ehollig avatar Apr 17 '24 17:04 ehollig

You have to be in browse mode document and then open the input gestures dialog.Von meinem iPhone gesendetAm 17.04.2024 um 19:23 schrieb Ethan Holliger @.***>: Small question @Adriani90 How did you assign same style navigation and different style navigation keys? I do not see entries for this in input gestures under settings.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

Adriani90 avatar Apr 17 '24 17:04 Adriani90

@mltony - we may need to revert this feature over this issue if this issue isn't fixed in beta

seanbudd avatar Apr 23 '24 00:04 seanbudd

I haven't managed to reproduce KeyError as you described, but I do notice that style navigation commands are indeed very slow and often times time out. I think this boils down to slow TextInfo implementation. If I do watchdog.terminate() then many commands succeed on my computer (with #16447 included and if not affected by #16448). I most likely can't speed up textInfo implementation, nor can I fix #16448. Given that, it seems to me the best course of actions would be to disable style navigation in outlook completely. @seanbudd , @Adriani90 , what do you think?

mltony avatar Apr 25 '24 03:04 mltony

I think we should let it there still because it can serve as a very good test case for future improvements to textInfo implementation.

The commands for this feature are unassigned, so the impact will be limited to users who really know what they do with it.

Adriani90 avatar Apr 25 '24 07:04 Adriani90

@mltony - yes, please disable style navigation in outlook and when UIA is disabled in word

seanbudd avatar May 12 '24 23:05 seanbudd