With cache enabled, opening a Gmail message renders incorrectly in NVDA buffer
Categories
(Core :: Disability Access APIs, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox96 | --- | fixed |
People
(Reporter: Jamie, Assigned: Jamie)
References
Details
Attachments
(1 file)
STR:
- Ensure accessibility.cache.enabled is true and NVDA is running.
- Open Gmail.
- Open a message from the message list.
- Try to read the message in NVDA browse mode.
- Expected: You should not see content from the message list and you should be able to read the message.
- Actual: The message is often missing and you see content from the message list which is no longer really in the document.
I think this is due to MSAA ids being reused too quickly. NVDA processes mutations asynchronously, so I think it sees mutations on ids that haven't been removed from the buffer yet and things get very confused. If I prevent ids from being released by tweaking MsaaAccessible's destructor, the problem goes away.
I guess this is a problem because we process all RemoteAccessible removals before we process any shows. Normally, within the same tick, removed accessibles exist at least until the newly added ones are shown.
I think my "limbo set" idea from bug 1739050 would fix this. That is, we don't destroy Accessibles until all mutations are done.
Assignee | ||
Comment 1•3 years ago
|
||
(In reply to James Teh [:Jamie] from comment #0)
I think my "limbo set" idea from bug 1739050 would fix this. That is, we don't destroy Accessibles until all mutations are done.
I implemented this and it didn't fully fix the problem. I guess the relevant mutations must be happening across different ticks. That's certainly quite possible, but what I don't understand is why this doesn't cause problems with the cache disabled. I guess the COM runtime must be holding onto references for a short while or something.
I guess the only real way to fix this is to have a short delay before MSAA ids are released. That needs to be longer than a tick, but not so long that we leak too much. Maybe an idle callback or something? Yuck.
Assignee | ||
Comment 2•3 years ago
|
||
This is necessary to fix problems with Gmail and NVDA caused by reusing ids too quickly.
Updated•3 years ago
|
Pushed by jteh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3baa364e3c78 When the cache is enabled, release MSAA ids after a short delay. r=morgan
Comment 4•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Comment 5•3 years ago
|
||
Hello James,
I made the settings from description, installed the NVDA and followed the steps from description on Win10x64 using build 96.0a1(20211125214104), but I was not able to reproduce the issue. Can you please confirm that issue is fixed on your side?
Thank you so much.
Assignee | ||
Comment 6•2 years ago
|
||
The issue is definitely fixed for me. It was always a little unpredictable, but i haven't seen this since the patch landed.
Assignee | ||
Comment 7•2 years ago
•
|
||
(In reply to James Teh [:Jamie] from comment #1)
what I don't understand is why this doesn't cause problems with the cache disabled.
I forgot that we don't release the MsaAccessible (and thus its id) until the AccessibleWrap is destroyed. In contrast, the MsaaAccessible for a RemoteAccessible is deleted as soon as the RemoteAccessible is shut down (since RemoteAccessibles aren't ref counted). Combined with the difference in how mutations are handled between local and remote as described in comment 0, this must provide for sufficient time before ids are reused when the cache is disabled.
Description
•