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

TextInfo in MSWord throws RuntimeError #16172

Open
mltony opened this issue Feb 13, 2024 · 0 comments
Open

TextInfo in MSWord throws RuntimeError #16172

mltony opened this issue Feb 13, 2024 · 0 comments
Labels
p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.

Comments

@mltony
Copy link
Contributor

mltony commented Feb 13, 2024

Steps to reproduce:

  1. Open a new blank document in Microsoft Word.
  2. Enter browse mode by pressing NVDA+space.
  3. Open NVDA Python console by pressing NVDA+control+z and type:
t=focus.treeInterceptor.makeTextInfo('caret')
t.expand('paragraph')
t.collapse(True)

Actual behavior:

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "treeInterceptorHandler.pyc", line 234, in collapse
  File "NVDAObjects\window\winword.pyc", line 1048, in collapse
RuntimeError

Expected behavior:

RuntimeError should not be thrown. In general, this is the way I try to advance to the next paragraph and this pattern appears to be used in other places in NVDA. There doesn't appear to be a unified way to communicate to client code that there is no next paragraph available, but in browsers I typically detect that by trying to do so by calling info.expand('paragraph') and then checking whether textInfo is still collapsed. But throwing RuntimeError doesn't seem right here.

NVDA logs, crash dumps and other attachments:

N/A

System configuration

NVDA installed/portable/running from source:

Running from dist

NVDA version:

master

Windows version:

Windows 10

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

MSWord 16.0.17029.20140
This reproduces in both UIA enabled and disabled modes.

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.

No

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?

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

2 participants