Skip to content

Fixup of pr 12925: errors due to delayed spelling detection when pressing tab sometimes#12931

Merged
michaelDCurran merged 1 commit into
masterfrom
i12930
Oct 13, 2021
Merged

Fixup of pr 12925: errors due to delayed spelling detection when pressing tab sometimes#12931
michaelDCurran merged 1 commit into
masterfrom
i12930

Conversation

@michaelDCurran

Copy link
Copy Markdown
Member

Link to issue number:

Fixes #12930
Fixup of #12925

Summary of the issue:

When fetching the formatting of the last typed word after a delay, in order to detect if there is a spelling error, errors can occur if the underlying object dies or is replaced.
For example:
when first pressing tab in the Firefox profile selection dialog:

ERROR - queueHandler.flushQueue (18:07:01.213) - MainThread (3880):
Error in func NVDAObject._reportErrorInPreviousWord.<locals>._delayedDetection
Traceback (most recent call last):
  File "queueHandler.pyc", line 55, in flushQueue
  File "NVDAObjects\__init__.pyc", line 1067, in _delayedDetection
  File "textInfos\offsets.pyc", line 573, in getTextWithFields
  File "NVDAObjects\IAccessible\__init__.pyc", line 241, in _getFormatFieldAndOffsets
AttributeError: 'NoneType' object has no attribute 'IAccessibleTextObject'

Description of how this pull request fixes the issue:

Catch Exception rather than RuntimeError when fetching formatting by calling GetTextWithFields.
Note that this exception will still be logged at debug warning.

Testing strategy:

Known issues with pull request:

None known.

Change log entries:

New features
Changes
Bug fixes
For Developers

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

…any exception not just RuntimeError as a lot of complex things could go wrong if the underlying object disappears for instance.
@michaelDCurran michaelDCurran requested a review from a team as a code owner October 13, 2021 21:27
@michaelDCurran michaelDCurran merged commit bc12815 into master Oct 13, 2021
@michaelDCurran michaelDCurran deleted the i12930 branch October 13, 2021 23:12
@nvaccessAuto nvaccessAuto added this to the 2021.3 milestone Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Errors when navigating in and out of some edit fields

3 participants