Is there an existing issue for this?
Did you read the "Reporting a bug" section on Contributing file?
Current Behavior
On windows when exiting the program there is a CTD intermittently. This occurs when media is playing in Media Element and you exit the program while it is still running/loaded.
Expected Behavior
Windows should cleanly exit when you click close button.
Steps To Reproduce
- Run included sample from this repo.
- Navigated to Media Element Page.
- Exit program.
Link to public reproduction project repository
https://github.com/CommunityToolkit/Maui
Environment
- .NET MAUI CommunityToolkit: 7.0.1
- .Net Maui Communitytoolkit MediaElement: 3.0.1
- OS: Windows 10.0.19041
- .NET MAUI: 8.0.x
Anything else?
At some point the MediaElement.handler?.DisconnectHandler(); was removed from page unload event. This adds it back and fixes crashes on Windows and most likely fixes memory leaks and other issues.
Is there an existing issue for this?
Did you read the "Reporting a bug" section on Contributing file?
Current Behavior
On windows when exiting the program there is a CTD intermittently. This occurs when media is playing in Media Element and you exit the program while it is still running/loaded.
Expected Behavior
Windows should cleanly exit when you click close button.
Steps To Reproduce
Link to public reproduction project repository
https://github.com/CommunityToolkit/Maui
Environment
Anything else?
At some point the
MediaElement.handler?.DisconnectHandler();was removed from page unload event. This adds it back and fixes crashes on Windows and most likely fixes memory leaks and other issues.