-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle a null szPname field #75695
Handle a null szPname field #75695
Conversation
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to this area: @danmoseley Issue DetailsFixes #75667
|
src/libraries/Common/src/Interop/Windows/WinMm/Interop.waveOutGetDevCaps.cs
Outdated
Show resolved
Hide resolved
If you add a call before this line
to synth.SetOutputToDefaultAudioDevice() does it repro it? If so maybe throw that in this PR?
|
@danmoseley should I start a backport for this PR? |
/backport to release/7.0 |
Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/3063572266 |
/backport to release/7.0-rc2 |
Started backporting to release/7.0-rc2: https://github.com/dotnet/runtime/actions/runs/3063574386 |
@jkoritzinsky, were you able to repro the exception before the fix and validate it doesn't repro after? |
I wasn't able to repro it initially, but based on the stack trace this was the only possible location for the exception. I'll try reproing it without the fix again if that will help for servicing. |
It'd help both with servicing and with confidence that we actually fixed the problem. |
I can't get it to repro locally on my machine. It's possible I didn't configure something right on the Windows side as there's some Windows configuration for System.Speech that I had to go through before any of the tests would run. |
This code is pretty dependent on OS state, thinking back to bugs we've seen. I know that it can depend on eg what voices you have installed for what cultures and other registry settings and maybe audio device configuration. Perhaps it would be OK if you can just set szPname to null in the debugger and then run. |
It looks like we won't even hit this code path if the following registry key isn't set: runtime/src/libraries/System.Speech/src/Internal/ObjectToken/SAPICategories.cs Lines 31 to 57 in b707fd6
|
Figured out which control panel setting to set that key. Repro'd locally without the fix and verified the fix locally. |
Ha, yes there's an example of the zillion registry settings |
Fixes #75667