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

Same style and previous style navigation: in an empty MS Word document navigating to next same style and next different style gives an runtime error, navigating to previous styles works properly. #16405

Closed
Adriani90 opened this issue Apr 16, 2024 · 3 comments
Labels
bug/regression p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Milestone

Comments

@Adriani90
Copy link
Collaborator

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 empty MS word document
  5. Make sure UIA for MS Word is disabled
  6. Press the assigned commands for navigating to next and previous text styles

Actual behavior:

NVDA gives a runtime error when attempting to navigate to next different or next same style text.

IO - inputCore.InputManager.executeGesture (22:39:29.904) - winInputHook (10508):
Input: kb(laptop):shift+ü
IO - speech.speech.speak (22:39:29.965) - MainThread (19244):
Speaking ['No previous different style text']
IO - inputCore.InputManager.executeGesture (22:39:31.054) - winInputHook (10508):
Input: kb(laptop):ü
ERROR - scriptHandler.executeScript (22:39:31.122) - MainThread (19244):
error executing script: <bound method BrowseModeTreeInterceptor.addQuickNav.<locals>.<lambda> of <NVDAObjects.window.winword.WordDocumentTreeInterceptor object at 0x0A1A3A10>> 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 2399, in _iterTextStyle
  File "textInfos\__init__.pyc", line 756, in moveToCodepointOffset
  File "treeInterceptorHandler.pyc", line 234, in collapse
  File "NVDAObjects\window\winword.pyc", line 1052, in collapse
RuntimeError
IO - inputCore.InputManager.executeGesture (22:39:31.794) - winInputHook (10508):
Input: kb(laptop):shift+plus
IO - speech.speech.speak (22:39:31.864) - MainThread (19244):
Speaking ['No previous same style text']
IO - inputCore.InputManager.executeGesture (22:39:32.614) - winInputHook (10508):
Input: kb(laptop):plus
ERROR - scriptHandler.executeScript (22:39:32.653) - MainThread (19244):
error executing script: <bound method BrowseModeTreeInterceptor.addQuickNav.<locals>.<lambda> of <NVDAObjects.window.winword.WordDocumentTreeInterceptor object at 0x0A1A3A10>> with gesture 'plus'
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 2399, in _iterTextStyle
  File "textInfos\__init__.pyc", line 756, in moveToCodepointOffset
  File "treeInterceptorHandler.pyc", line 234, in collapse
  File "NVDAObjects\window\winword.pyc", line 1052, in collapse
RuntimeError

Expected behavior:

NVDA should report "no next different style text" or "no next same style text". This works as expected for previous styles commands.

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
Copy link
Collaborator Author

cc: @mltony this will affect lot of people who are not using UIA for MS Office, so a fix for object model is needed as well.

@seanbudd seanbudd added this to the 2024.2 milestone Apr 18, 2024
@mltony
Copy link
Contributor

mltony commented Apr 19, 2024

This is caused by #16172 - for some reason non_UIA textInfo throws exception when colllapse() is called. In some cases it's easy to catch and deal with this, but in this case collapse is called from within moveToCodepointOffset and it's not immediately clear how to fix this on my side. If I have time I'll try to figure out why MSWord implementation raises this error.

@seanbudd seanbudd added bug/regression p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation. labels Apr 23, 2024
@Adriani90
Copy link
Collaborator Author

This is still reproducible in the last alpha.

seanbudd pushed a commit that referenced this issue May 20, 2024
)

Closes #16459
Closes #16408
Closes #16458
Closes #16405

Summary of the issue:
We have discovered multiple problemds with non-UIA textInfo implementation in MS Word. Some examples are #16527, #16459, #16458. Also TextInfo implenetation in Outlook has proven to be too slow for style navigation. Therefore disabling both.

Description of user facing changes
"Not supported in this document" message is spoken.

Description of development approach
Raising an error when Outlook or non-UIA Word is detected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/regression p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Projects
None yet
Development

No branches or pull requests

3 participants