nvaccess/nvda

Text editing suddenly becomes broken until NVDA restart

Opened this issue · 22 comments

Steps to reproduce:

Unfortunately, I cannot provide any steps, it happens suddenly and without an apparent reason.

Actual behavior:

While I'm writing something in a browser, like a comment on Facebook, or a mail in Thunderbird, NVDA says "blank" where there was text until a second ago, sometimes still shows on Braille display, sometimes not, reading char by char with arrows, but not by line or with control+home or control+end.

No change if I switch on other windows, or disable and enable again focus mode, refresh the page etc.

Only an NVDA restart works.

It's just happened while I'm writing a comment on Facebook, and in that tab there is still the described situation (I not restarted yet). But the strange is that I can write here as usual.

Expected behavior:

NVDA should continue to work properly.

NVDA logs, crash dumps and other attachments:

It's just happened, I switched log level to debug and isolated these lines:


DEBUGWARNING - NVDAObjects.IAccessible.ia2TextMozilla.MozillaCompoundTextInfo._getText (21:53:51.281) - MainThread (7464):
Tried to walk up past the root. Objects probably dead.
[...]
IO - inputCore.InputManager.executeGesture (21:53:51.522) - winInputHook (6408):
Input: kb(laptop):rightArrow
DEBUG - editableText.EditableText._hasCaretMoved (21:53:51.534) - MainThread (7464):
Caret move detected using bookmarks. Elapsed 0.00503087 sec, retries 2
IO - speech.speech.speak (21:53:51.550) - MainThread (7464):
Speaking [CharacterModeCommand(True), 'r', EndUtteranceCommand()]
IO - speech.speech.speak (21:53:51.551) - MainThread (7464):
Speaking [BreakCommand(time=1000), 'Roma', EndUtteranceCommand()]


System configuration

NVDA installed/portable/running from source:

Installed.

NVDA version:

NVDA alpha-30573,2f0a4116, but it's happening from months, from time to time.

Windows version:

Windows 10 22H2.

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

Firefox 121, Thunderbird 122... and some previous versions of last months, as I said.

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.

I used 2023.3rc2 for a while, and I'm quite sure it happened with that version too.

But I read also some basic users (so with stable versions, probably) that reported this issue.

If NVDA add-ons are disabled, is your problem still occurring?

Unfortunately, I cannot test with add-ons disabled, being the issue so irregular. But no add-ons appears in the log when the issue raises.

Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?

Yes, ran it various times in these months.

I can confirm this issue with NVDA 2023.3 and Slack!
Even when there is text available in the text field, NVDA continues to read 'blank' until we restart NVDA. I couldn't identify specific steps, as it happens very randomly!

I have seen this same thing happen in Thunderbird 115 and Beeper.

@gauravahir28, @govsta1981 are you seeing this with addons disabled?

Is this also happening when no braille display is connected?

No, I use the IBM TTS Add-on.
I couldn't try after disabling add-ons as it requires an NVDA restart, and after restarting NVDA, the problem does not persist.
I also don't use a braille display.
I'll attempt to use NVDA after disabling add-ons for a while and see if I can still replicate this issue.

I've seen this occasionally too. It's the same underlying issue as #15862 (comment), but I don't know why it happens. In this case, the IAccessibleHyperlink interface breaks.

I originally thought this was Firefox specific, but if it's happening in the Slack app, that's not the case because the Slack app is based on Chromium.

When someone next sees this in the Slack app, can you please do the following:

  1. Focus the text box which isn't working.
  2. Press NVDA+control+z to open the NVDA Python console.
  3. Paste this command and press enter:
    import IAccessibleHandler as iah; focus.firstChild.IAccessibleObject.QueryInterface(iah.IA2.IAccessibleHyperlink).startIndex
  4. Provide the output here.

I want to verify that Slack is failing the same way as Firefox does. Thanks.

I've not tried disabling add-ons. While I have a braille display, it's not always connected. I still see this issue whether it is or is not connected.

@jcsteh - I could replicate this issue, but getting "0" as output after performing steps given above!
I also attempted the same steps on a functioning text field (MS Teams), and the output there is also "0"!

I just saw it in Slack. and when queryInterface to IAccessibleHyperlink I get:

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "monkeyPatches\comtypesMonkeyPatches.pyc", line 32, in __call__
_ctypes.COMError: (-2147023179, 'The interface is unknown.', (None, None, None, 0, None))

Hi,
just for reference, same as reported by @michaelDCurran but in Firefox, tried some days ago.
I don't use Slack or Teams.

Quite incidentally, it happened to me yesterday in Thunderbird 122 Beta 4. NVDA kept reporting blank, but pressing Control+A followed by Control+C actually copied the text I had already typed. I was using one of the more recent NVDA alphas released last week.

@jcsteh In the Slack desktop app:

>>> import IAccessibleHandler as iah; focus.firstChild.IAccessibleObject.QueryInterface(iah.IA2.IAccessibleHyperlink).startIndex
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "monkeyPatches\comtypesMonkeyPatches.pyc", line 32, in __call__
_ctypes.COMError: (-2147023179, 'The interface is unknown.', (None, None, None, 0, None))

It would appear then that we're dealing with the same problem. So, this definitely isn't Mozilla specific.

@jcsteh Just reproduced it in Slack on the latest stable of NVDA.

>>> import IAccessibleHandler as iah; focus.firstChild.IAccessibleObject.QueryInterface(iah.IA2.IAccessibleHyperlink).startIndex
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "monkeyPatches\comtypesMonkeyPatches.pyc", line 32, in __call__
_ctypes.COMError: (-2147023179, 'The interface is unknown.', (None, None, None, 0, None))

I guess it is not really related, but I was asking myself if a deeper look into #7719 could help further?
But since this seems to occur only in focus mode I might be wrong. just thinking out loud :-).

Can anyone still reproduce this in NVDA last alpha?

Can anyone still reproduce this in NVDA last alpha?
Yes, sadly. Just happened:

  • NVDA alpha-31971,c5954630
  • Firefox 126.0

Does anyone if other ATs experience this behaviour e.g. JAWS?
It seems like interacting with IAccessible interfaces is breaking after some period of time, it would be useful to determine if this may be a bug in browsers or windows.

This is very unlikely to impact JAWS because JAWS runs all of these queries in-process. This problem only seems to impact cross-process calls; i.e. calls using the COM marshaler. Note that it doesn't impact NVDA's buffer rendering, only cross-process NVDA code (text editing, table navigation, etc.).

What's really curious to me is that I've never seen this break the IAccessible2 interface, only the IAccessibleHyperlink and IAccessibleTable2 interfaces. I haven't been able to figure out what's special about those two.