Maui
Maui copied to clipboard
[BUG] After using SpeechToText my application has an unhandled exception on close
Is there an existing issue for this?
- [X] I have searched the existing issues
Did you read the "Reporting a bug" section on Contributing file?
- [X] I have read the "Reporting a bug" section on Contributing file: https://github.com/CommunityToolkit/Maui/blob/main/CONTRIBUTING.md#reporting-a-bug
Current Behavior
If I use SpeechToText.Default
or register a singleton and use it via DI, I get an unhandled exception in C:\Windows\SYSTEM32\ntdll.dll on closing the application.
This doesn't appear when running a release build but I can see it's still logged to the application event log.
Expected Behavior
No error should occur.
Steps To Reproduce
- use the
StartListeningAsync()
method - close the project, with or without calling the
StopListeningAsync()
method - observe debugger error and error in application event log
Link to public reproduction project repository
https://github.com/dylandhall/MauiToolkitErrorExample
Environment
- .NET MAUI CommunityToolkit: 9.0.0
- OS: Windows
- .NET MAUI: 8.0.21 and 8.0.40
Anything else?
Error in visual studio:
Error text in event log:
Faulting application name: ErrorExample.exe, version: 1.0.0.0, time stamp: 0x661f0000
Faulting module name: ntdll.dll, version: 10.0.22621.3527, time stamp: 0x92b2df34
Exception code: 0xc000000d
Fault offset: 0x0000000000126330
Faulting process id: 0x0x2048
Faulting application start time: 0x0x1DAAC01D2FF0BC0
Faulting application path: C:\code\ErrorExample\bin\Debug\net8.0-windows10.0.19041.0\win10-x64\AppX\ErrorExample.exe
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
Report Id: 1b94b74d-ef97-4b65-89f6-5e2a482c35a3
Faulting package full name: com.companyname.errorexample_1.0.0.1_x64__9zz4h110yvjzm
Faulting package-relative application ID: App
I've attempted a number of methods of stopping/disposing the speech engine before closing, as well as adding via DI. Same error in all instances.