UIA: crash at very end of buffer #10823

Closed
opened 2026-01-31 02:31:17 +00:00 by claunia · 6 comments
Owner

Originally created by @codeofdusk on GitHub (Sep 29, 2020).

Originally assigned to: @carlos-zamora on GitHub.

In the NVDA Python console (NVDA+control+z):

>>> from NVDAObjects.UIA import UIATextInfo
>>> ti=UIATextInfo(nav, "last")
>>> ti.move("character", 1)  # conhost crashes
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "NVDAObjects\UIA\__init__.pyc", line 752, in move
  File "comtypesMonkeyPatches.pyc", line 26, in __call__
_ctypes.COMError: (-2147220991, 'An event was unable to invoke any of the subscribers', (None, None, None, 0, None))

Note: fixing this bug may result in strange behaviour from NVDA (see here, around line 53). I'll remove the offending workaround once a fix is merged to master.

I suspect #6986 would fix this bug, but I think the root cause of this crash should be investigated before then. Cc @carlos-zamora.

Originally created by @codeofdusk on GitHub (Sep 29, 2020). Originally assigned to: @carlos-zamora on GitHub. In the NVDA Python console (NVDA+control+z): ``` python console >>> from NVDAObjects.UIA import UIATextInfo >>> ti=UIATextInfo(nav, "last") >>> ti.move("character", 1) # conhost crashes Traceback (most recent call last): File "<console>", line 1, in <module> File "NVDAObjects\UIA\__init__.pyc", line 752, in move File "comtypesMonkeyPatches.pyc", line 26, in __call__ _ctypes.COMError: (-2147220991, 'An event was unable to invoke any of the subscribers', (None, None, None, 0, None)) ``` Note: fixing this bug may result in strange behaviour from NVDA (see [here](https://github.com/nvaccess/nvda/blob/master/source/NVDAObjects/UIA/winConsoleUIA.py#L53), around line 53). I'll remove the offending workaround once a fix is merged to master. I suspect #6986 would fix this bug, but I think the root cause of this crash should be investigated before then. Cc @carlos-zamora.
Author
Owner

@DHowett commented on GitHub (Sep 29, 2020):

This is with main, not Carlos's PR #7770, yes?

@DHowett commented on GitHub (Sep 29, 2020): This is with `main`, not Carlos's PR #7770, yes?
Author
Owner

@codeofdusk commented on GitHub (Sep 29, 2020):

Correct.

@codeofdusk commented on GitHub (Sep 29, 2020): Correct.
Author
Owner

@carlos-zamora commented on GitHub (Sep 29, 2020):

@codeofdusk what does UIATextInfo(nav, "last") do?

@carlos-zamora commented on GitHub (Sep 29, 2020): @codeofdusk what does `UIATextInfo(nav, "last")` do?
Author
Owner

@codeofdusk commented on GitHub (Sep 29, 2020):

See here (starting at around line 292), but in summary it gets a document range degenerate at end (i.e. moves start to where end is).

@codeofdusk commented on GitHub (Sep 29, 2020): See [here](https://github.com/nvaccess/nvda/blob/master/source/NVDAObjects/UIA/__init__.py#L292) (starting at around line 292), but in summary it gets a document range degenerate at end (i.e. moves start to where end is).
Author
Owner

@ghost commented on GitHub (Nov 11, 2020):

:tada:This issue was addressed in #7792, which has now been successfully released as Windows Terminal v1.4.3141.0.🎉

Handy links:

@ghost commented on GitHub (Nov 11, 2020): :tada:This issue was addressed in #7792, which has now been successfully released as `Windows Terminal v1.4.3141.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.4.3141.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Author
Owner

@ghost commented on GitHub (Nov 11, 2020):

:tada:This issue was addressed in #7792, which has now been successfully released as Windows Terminal Preview v1.5.3142.0.🎉

Handy links:

@ghost commented on GitHub (Nov 11, 2020): :tada:This issue was addressed in #7792, which has now been successfully released as `Windows Terminal Preview v1.5.3142.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.5.3142.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#10823