Prevent infinite recursion for unspeakable chars#11865
Merged
Merged
Conversation
Fixes #11752 When reading characters that do not have any description in NVDA, a 'no content' utterance can be produced. In this case the empty string is the last 'command' in the sequence passed to 'ensureEndUtterance', resulting in the sequence not being given an indexCommand or an EndUtteranceCommand. The indexCommand is required for the cancellable speech processing, to be able to track which utterance a cancellableSpeechCommand belongs to.
zero is a might be a valid index. Only no index (None) shoudl take this path
michaelDCurran
approved these changes
Nov 25, 2020
michaelDCurran
left a comment
Member
There was a problem hiding this comment.
I am guessing without this fix, some kind of exception (perhaps infinite recursion) would have been raised within the unit test? That is, not just perhaps a missing expected index. Fix makes sense though.
Contributor
Author
Yes, I wrote the test first to reproduce the issue. It failed with something like "stack limit reached". |
feerrenrut
added a commit
that referenced
this pull request
Dec 1, 2020
Fix an issue introduced with #11865, which incorrectly used the return value of _checkForCancellations to indicate error/success, rather than utterance canceled (correctly) or no cancellations found. Instead, an exception is raised when the method can not complete, and the error is logged in this case.
feerrenrut
added a commit
that referenced
this pull request
Dec 4, 2020
Fix an issue introduced with #11865, which incorrectly used the return value of _checkForCancellations to indicate error/success, rather than utterance canceled (correctly) or no cancellations found. Instead, an exception is raised when the method can not complete, and the error is logged in this case.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
Fixes #11752
Summary of the issue:
When reading characters that do not have any description in NVDA, a 'no content' utterance can be produced. In this case the empty string is the last 'command' in the sequence passed to
ensureEndUtterance, resulting in the sequence not being given anindexCommandor anEndUtteranceCommand. TheindexCommandis required for the cancellable speech processing, tobe able to track which utterance a
cancellableSpeechCommandbelongs to.Description of how this pull request fixes the issue:
Testing performed:
huntil 'Preview' heading is foundright arrowuntil the character is encountered. The text for this part of the page will make this obvious.Known issues with pull request:
Change log entry:
None