Skip to content

Ensure that espeak does not exit NVDA's process on initialization error#10860

Merged
michaelDCurran merged 4 commits into
masterfrom
i10607
Mar 11, 2020
Merged

Ensure that espeak does not exit NVDA's process on initialization error#10860
michaelDCurran merged 4 commits into
masterfrom
i10607

Conversation

@michaelDCurran

Copy link
Copy Markdown
Member

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)

…rors such as the espeak path being invalid.
@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit 59b99d26e6

@feerrenrut feerrenrut left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would still be nice if we could give the user a little more information.

@michaelDCurran

Copy link
Copy Markdown
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.

@michaelDCurran michaelDCurran merged commit 28de493 into master Mar 11, 2020
@michaelDCurran michaelDCurran deleted the i10607 branch March 11, 2020 01:43
@nvaccessAuto nvaccessAuto added this to the 2020.1 milestone Mar 11, 2020
michaelDCurran added a commit that referenced this pull request Mar 11, 2020
@lukaszgo1

Copy link
Copy Markdown
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.

@michaelDCurran

michaelDCurran commented Mar 15, 2020 via email

Copy link
Copy Markdown
Member Author

@feerrenrut

Copy link
Copy Markdown
Contributor

More information:
#11392

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.

NVDA 2019.3Beta1 crashes when setting synthesizer to eSpeak NG if path name contains accented character

5 participants