Crash in TextRange::CommonParent with NVDA on, UIA enabled [@ mozilla::a11y::TextRange::CommonParent ]
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr115 | --- | unaffected |
firefox-esr128 | --- | unaffected |
firefox135 | --- | unaffected |
firefox136 | --- | unaffected |
firefox137 | --- | fixed |
People
(Reporter: nlapre, Assigned: Jamie)
References
(Blocks 2 open bugs)
Details
(Keywords: crash)
Crash Data
Attachments
(1 file)
Crash report: https://crash-stats.mozilla.org/report/index/0ed365f3-018f-4ca2-9390-59ad30250213
STR:
- Start or restart the browser with UIA enabled (in about:config, set
accessibility.uia.enable
to true) - Turn on NVDA.
- Ctrl + t to open a new tab, start typing something. For instance: about:config.
Expected: Typing doesn't crash the browser in this situation.
Actual: Partway through typing, the browser crashes.
cc :Jamie, I think this is potentially related to recent changes in CroppedSelectionRanges
since that new code is implicated in this call stack. Not sure if this is something that change introduced or not. Also: maybe this is something that can only happen with NVDA on Firefox UIA, but I'm inclined to fear it could happen with other IA2 ATs, too.
Assignee | ||
Comment 1•6 months ago
|
||
(In reply to Nathan LaPré from comment #0)
cc :Jamie, I think this is potentially related to recent changes in
CroppedSelectionRanges
since that new code is implicated in this call stack. Not sure if this is something that change introduced or not.
It's possible, though I've also seen intermittent crashes before when typing into the address bar, so I suspect it's a bug that's been lurking for a while.
Also: maybe this is something that can only happen with NVDA on Firefox UIA, but I'm inclined to fear it could happen with other IA2 ATs, too.
NVDA is using native UIA in this case. I've submitted a PR to force disable UIA for Firefox, but that hasn't been reviewed yet.
Assignee | ||
Updated•6 months ago
|
Assignee | ||
Comment 3•6 months ago
|
||
(In reply to Nathan LaPré from comment #0)
cc :Jamie, I think this is potentially related to recent changes in
CroppedSelectionRanges
since that new code is implicated in this call stack.
For completeness, I double checked by reverting the patch for bug 1825618. The crash still occurs. That said, I have a fix locally.
Assignee | ||
Comment 4•6 months ago
|
||
Sometimes, text in the accessibility tree can be out of date with DOM briefly because the accessibility engine updates text asynchronously.
When this happens, DOMPointToOffset can be called on a text node with an offset which is valid for DOM, but not yet valid for accessibility.
Previously, we ended up producing an invalid HyperText offset, causing a crash.
The best we can do in this case is gracefully constrain the offset to the text in the accessibility tree.
In the scenario in this bug report, the user was typing into the address bar.
The address bar added and selected text due to an autocomplete suggestion.
After the DOM update but before the accessibility tree was updated, a UIA client queried the selection.
Since selection is retrieved from DOM, this resulted in an offset that didn't exist in the accessibility tree.
Now that the offset is constrained, this will no longer result in a crash.
Comment 6•6 months ago
|
||
bugherder |
Updated•6 months ago
|
Description
•