Ensure that espeak does not exit NVDA's process on initialization error#10860
Merged
Conversation
…rors such as the espeak path being invalid.
See test results for failed build of commit 59b99d26e6 |
feerrenrut
approved these changes
Mar 10, 2020
feerrenrut
left a comment
Contributor
There was a problem hiding this comment.
It would still be nice if we could give the user a little more information.
…t be initialized.
Member
Author
|
I have now at least included the espeak data path in the exception message which is logged. Perhaps in future we could consider printing any exception resulting from setSynth in the error dialog the user sees. But I don't think that should be handled in this pr. |
Contributor
|
@michaelDCurran Would it be possible for 2020.2 to at least attempt to fix this in eSpeak? I believe NVAccess have submitted some fixes to eSpeak in the past. |
Member
Author
|
If we could identify exactly what the issue was in eSpeak, by all means
we would submit a patch. But up to now, we have not succeeded in working
out exactly why eSpeak cannot handle a path with non-ascii characters.
|
Contributor
|
More information: |
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 #10607
Summary of the issue:
By default, if eSpeak encounters an error on initialization such as the path to its data being invalid, it will call exit(), killing the entire NVDA process.
This specifically happens when NVDA is located in a path that contains non-ascii characters.
Description of how this pull request fixes the issue:
Ensure that espeak does not exit NVDA's process by passing the espeakINITIALIZE_DONT_EXIT flag to espeak_initialize.
Testing performed:
Ran NVDA from a path containing non-ascii characters. Ensured that NVDA with default config fell back to silence when espeak failed to initialize. Similarly, when NVDA was configured to use the oneCore synth, ensured that trying to choose espeak from the Synthesizer dialog showed an error dialog and stayed using oneCore.
Known issues with pull request:
None.
Change log entry:
Bug fixes:
NVDA no longer exits if there is an error initializing eSpeak. (#10607)