Gracefully ignore NVDANotInitializedError when scheduling WASAPI idle check.#15145
Merged
Conversation
Contributor
Author
|
@@ultrasound1372, could you please test this build and report whether it fixes the issue for you? Note that this isn't a signed build, so you won't be able to access administrator apps with it. |
|
This does appear to fix it, I can now hear the start-up sound as normal when running as a fresh portable. |
seanbudd
approved these changes
Jul 16, 2023
seanbudd
added a commit
that referenced
this pull request
Jul 25, 2023
Changes to handle #15150 Follow up to #14697, #14896, #15038, #15097, #15145 Summary of the issue: WASAPI usage is known to cause intermittent crashing in #15150. Generally, WASAPI code has not been proven to be stable. Due to this, it should not be enabled by default in 2023.2. WASAPI can be re-enabled by default once it is proven to be stable. Description of user facing changes Disable WASAPI by default, preventing intermittent crashing #15150 Description of development approach Turn the WASAPI checkbox into a feature flag, so that it can easily be re-enabled in future. Testing strategy: Manual testing Upgrading the profile: Test starting NVDA with the WASAPI config value set to "True/False" instead of a "enabled/disabled/default". Test the various controls related to WASAPI - ensure they are saved, applied and respected correctly.
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 #15143.
Summary of the issue:
When playing the start sound, NVDA can fail with this error:
Description of user facing changes
Fixed the error.
Description of development approach
Feeding WASAPI audio schedules an idle check, which uses core.callLater. That will fail if the wx.App isn't initialised yet.
We now just catch this and ignore it. playWaveFile closes the stream after playing anyway, so this first idle check isn't important.
Testing strategy:
I'm not able to reproduce this on my system. This is likely because of timing differences. This problem is a race condition between the main thread and the playWaveFile thread.
I tested that NVDA starts without problems. However, we'll need the user who reported this (@ultrasound1372) to provide feedback on a try build to be sure that this works.
Known issues with pull request:
None.
Change log entries:
None, since this regression never landed in a release.
Code Review Checklist: