nvda
nvda copied to clipboard
Text style navigation: Runtime error, NVDA cannot find desired offset in textInfo when using tables in MS Word with UIA disabled
Steps to reproduce:
- Open NVDA
- Assign [ and shift+[ for different style navigation
- Assign ] and shift+] for same style navigation
- Open an MS Word document with different text formats, where headings are indicated by text font size instead of heading levels, and tables are used to structure content, see attached document for a test case.
- Make sure UIA for MS Word is disabled in NVDA advanced settings
- Navigate to a heading (e.g. professional background), and Press the assigned commands for navigating to next and previous text styles
Actual behavior:
NVDA stops navigating, and the focus does not move. Following is written to the log:
IO - inputCore.InputManager.executeGesture (17:26:53.868) - winInputHook (18680):
Input: kb(laptop):plus
DEBUG - watchdog._waitUntilNormalCoreAliveTimeout (17:26:54.378) - watchdog (1936):
Potential freeze, waiting up to 10 seconds.
IO - speech.speech.speak (17:26:55.140) - MainThread (22192):
Speaking ['Academic experience\n']
DEBUG - UIAHandler.shouldUseUIAInMSWord (17:26:55.167) - MainThread (22192):
User does not want UIA in MS Word unless necessary
DEBUG - watchdog._waitUntilNormalCoreAliveTimeout (17:26:55.380) - watchdog (1936):
Recovered from potential freeze after 1.502466700000241 seconds.
IO - inputCore.InputManager.executeGesture (17:26:55.663) - winInputHook (18680):
Input: kb(laptop):shift+ü
ERROR - scriptHandler.executeScript (17:26:55.780) - MainThread (22192):
error executing script: <bound method BrowseModeTreeInterceptor.addQuickNav.<locals>.<lambda> of <NVDAObjects.window.winword.WordDocumentTreeInterceptor object at 0x0664D430>> with gesture 'Umschalt+ü'
Traceback (most recent call last):
File "scriptHandler.pyc", line 295, in executeScript
File "browseMode.pyc", line 567, in <lambda>
File "browseMode.pyc", line 516, in _quickNavScript
File "browseMode.pyc", line 2405, in _iterTextStyle
File "browseMode.pyc", line 2326, in _expandStyle
File "textInfos\__init__.pyc", line 793, in moveToCodepointOffset
RuntimeError: Unable to find desired offset in TextInfo.
IO - inputCore.InputManager.executeGesture (17:26:56.484) - winInputHook (18680):
Input: kb(laptop):plus
DEBUG - watchdog._waitUntilNormalCoreAliveTimeout (17:26:56.991) - watchdog (1936):
Potential freeze, waiting up to 10 seconds.
IO - speech.speech.speak (17:26:57.112) - MainThread (22192):
Speaking ['Seite 2', 'Projects and initiatives\n']
DEBUG - UIAHandler.shouldUseUIAInMSWord (17:26:57.128) - MainThread (22192):
User does not want UIA in MS Word unless necessary
DEBUG - watchdog._waitUntilNormalCoreAliveTimeout (17:26:57.492) - watchdog (1936):
Recovered from potential freeze after 1.0022185000002537 seconds.
IO - inputCore.InputManager.executeGesture (17:26:57.712) - winInputHook (18680):
Input: kb(laptop):shift+ü
ERROR - scriptHandler.executeScript (17:26:57.997) - MainThread (22192):
error executing script: <bound method BrowseModeTreeInterceptor.addQuickNav.<locals>.<lambda> of <NVDAObjects.window.winword.WordDocumentTreeInterceptor object at 0x0664D430>> with gesture 'Umschalt+ü'
Traceback (most recent call last):
File "scriptHandler.pyc", line 295, in executeScript
File "browseMode.pyc", line 567, in <lambda>
File "browseMode.pyc", line 516, in _quickNavScript
File "browseMode.pyc", line 2461, in _iterTextStyle
File "browseMode.pyc", line 2326, in _expandStyle
File "textInfos\__init__.pyc", line 793, in moveToCodepointOffset
RuntimeError: Unable to find desired offset in TextInfo.
IO - inputCore.InputManager.executeGesture (17:26:58.921) - winInputHook (18680):
Input: kb(laptop):shift+plus
DEBUG - watchdog._waitUntilNormalCoreAliveTimeout (17:26:59.422) - watchdog (1936):
Potential freeze, waiting up to 10 seconds.
ERROR - scriptHandler.executeScript (17:26:59.518) - MainThread (22192):
error executing script: <bound method BrowseModeTreeInterceptor.addQuickNav.<locals>.<lambda> of <NVDAObjects.window.winword.WordDocumentTreeInterceptor object at 0x0664D430>> with gesture 'Umschalt+plus'
Traceback (most recent call last):
File "scriptHandler.pyc", line 295, in executeScript
File "browseMode.pyc", line 567, in <lambda>
File "browseMode.pyc", line 516, in _quickNavScript
File "browseMode.pyc", line 2461, in _iterTextStyle
File "browseMode.pyc", line 2326, in _expandStyle
File "textInfos\__init__.pyc", line 793, in moveToCodepointOffset
RuntimeError: Unable to find desired offset in TextInfo.
Expected behavior:
Navigation should continue, e.g. within the tables or skipping the tables.
NVDA logs, crash dumps and other attachments:
n/a
System configuration
NVDA installed/portable/running from source:
Installed
NVDA version:
alpha-31645,bf96860d (2024.2.0.31645)
Windows version:
Windows 11 23 H2
Name and version of other software in use when reproducing the issue:
MS Office Word 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?
No add-ons in use
Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?
cc: @mltony is this maybe related to #16448?
This ssems to work properly when UIA is enabled.
- Navigate to a heading (e.g. professional background)
There is no such text in the attached document. I assume you meant "Professional experience". But having said that, for some reason your issue doesn't repro on my computer. Just to clarify, when you say
Make sure UIA for MS Word is disabled in NVDA advanced settings
I only have this option:
Use UI Automation to access Microsoft Word document controls:
Only when necessary
Yes only when necessary is the value I was refering too.Did you try to navigate back and forth between the headings? E.g. until the last heading and back to the first via same style navigation for example?I definitely reproduce this on several machines.Von meinem iPhone gesendetAm 30.04.2024 um 00:36 schrieb mltony @.***>:
Navigate to a heading (e.g. professional background)
There is no such text in the attached document. I assume you meant "Professional experience". But having said that, for some reason your issue doesn't repro on my computer. Just to clarify, when you say
Make sure UIA for MS Word is disabled in NVDA advanced settings
I only have this option: Use UI Automation to access Microsoft Word document controls: Only when necessary
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
Yes, I confirm I can navigate back and forth between headings with styleNav commands. Navigate to different style also works as expected. I just tested on my other laptop running Windows 10 - same experience there.
Did you make sure UIA is set to "only necessary" for MS Word? Which MS Word version are you using?
For what I can say, for me style navigation does not really work in this example document at ll. I get this in the log:
IO - inputCore.InputManager.executeGesture (11:59:36.181) - winInputHook (18700):
Input: kb(laptop):ü
ERROR - scriptHandler.executeScript (11:59:36.431) - MainThread (2304):
error executing script: <bound method BrowseModeTreeInterceptor.addQuickNav.<locals>.<lambda> of <NVDAObjects.window.winword.WordDocumentTreeInterceptor object at 0x06128390>> 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 (11:59:38.996) - winInputHook (18700):
Input: kb(laptop):shift+plus
DEBUG - watchdog._waitUntilNormalCoreAliveTimeout (11:59:39.496) - watchdog (24592):
Potential freeze, waiting up to 10 seconds.
ERROR - scriptHandler.executeScript (11:59:39.581) - MainThread (2304):
error executing script: <bound method BrowseModeTreeInterceptor.addQuickNav.<locals>.<lambda> of <NVDAObjects.window.winword.WordDocumentTreeInterceptor object at 0x06128390>> with gesture 'Umschalt+plus'
Traceback (most recent call last):
File "scriptHandler.pyc", line 295, in executeScript
File "browseMode.pyc", line 567, in <lambda>
File "browseMode.pyc", line 516, in _quickNavScript
File "browseMode.pyc", line 2461, in _iterTextStyle
File "browseMode.pyc", line 2326, in _expandStyle
File "textInfos\__init__.pyc", line 793, in moveToCodepointOffset
RuntimeError: Unable to find desired offset in TextInfo.
DEBUG - watchdog._waitUntilNormalCoreAliveTimeout (11:59:39.997) - watchdog (24592):
Recovered from potential freeze after 1.000924300024053 seconds.
Note: if you restart NVDA while the document is focused the object model will not be available and UIA will be used although it is set to "only when necessary". Alt+tabbing away and back to the document makes sure you are using object model.
cc: @CyrilleB79 or @lukaszgo1 can you test as well?
Did you make sure UIA is set to "only necessary" for MS Word?>
Yes.
appModule.productName: 'Microsoft Office' appModule.productVersion: '16.0.17425.20176'
I tried restarting NVDA and Alt-tabbing back and forth and still cannot reproduce this.
@burmancomp, @cary-rowen could you please test if you have this issue with UIA set to "only when necessary" for MS Word in NVDA advanced settings? This would help allot. ON my end I cannot use this feature unfortunately. @mltony any suggestions how I can solve this on my end?