Skip to content

Fixing GC unreachable error of table navigation #13613

Merged
michaelDCurran merged 2 commits into
nvaccess:masterfrom
mltony:fix_gc_error
Apr 20, 2022
Merged

Fixing GC unreachable error of table navigation #13613
michaelDCurran merged 2 commits into
nvaccess:masterfrom
mltony:fix_gc_error

Conversation

@mltony

@mltony mltony commented Apr 16, 2022

Copy link
Copy Markdown
Contributor

Link to issue number:

#13578

Summary of the issue:

Intermittent GC error "unreachable objects" caused by PR #13345.

Description of how this pull request fixes the issue:

The root cause was that we used to store TextInfo object inside Document, thus creating a cyclic reference. Such reference loops cannot be deleted by zeroing reference counter and can only be deleted by full GC sweep. I am not sure why NVDA prints warnings in this case.
This was fixed by not storing TextInfo in the first place. We now store last cell coordinates as lastRow/lastCol. Table cache is going to be valid as long as row/col of current selection are the same as stored lastRow/lastCol - and in this case we will be using trueRow/trueCol to compute next cell to preserve coordinates when navigating through merged cells.

Testing strategy:

Tested in HTML tables in both Chrome and Firefox.
Tested using explicit test case by @lukaszgo1 in #13578.

Known issues with pull request:

N/A

Change log entries:

N/A

Code Review Checklist:

  • Pull Request description:
    • description is up to date
    • change log entries
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • API is compatible with existing add-ons.
  • Documentation:
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English

@mltony mltony requested a review from a team as a code owner April 16, 2022 17:04
@mltony mltony requested a review from michaelDCurran April 16, 2022 17:04
@seanbudd seanbudd added the conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review. label Apr 19, 2022
@michaelDCurran michaelDCurran merged commit a55f9a6 into nvaccess:master Apr 20, 2022
@nvaccessAuto nvaccessAuto added this to the 2022.2 milestone Apr 20, 2022
@seanbudd seanbudd linked an issue Apr 27, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Intermittent garbage handler errors in Firefox

4 participants