-
Notifications
You must be signed in to change notification settings - Fork 461
Open
Labels
Description
Is there an existing issue for this?
- I have searched the existing issues
Did you read the "Reporting a bug" section on Contributing file?
- 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
Hello,
I am facing an issue with the CameraView when capturing an image and the user hits the Back button before the callback was handled.
This results in the following exception.
**System.NotSupportedException:** 'Unable to activate instance of type CommunityToolkit.Maui.Core.CameraManager+ImageCallBack from native handle 0x79636e2bf8 (key_handle 0x2b0bc91).'
If the capture event was handled the Back button will not crash the application.
Expected Behavior
The application should not crash when the exception is thrown.
Steps To Reproduce
- Open the
CommunityToolkit.Maui.Sample.slnsolution - Start the
CommunityToolkit.Maui.Sampleapplication on an Android phone. - Navigate to
Views - Select the
CameraView Page - Hit the
Capture Imagebutton and immediately hit theBackbutton in the toolbar.
Link to public reproduction project repository
https://github.com/CommunityToolkit/Maui/tree/49a124115c6bc09d9ca1ddcdbcc8b425c8ff7479/samples
Environment
- .NET MAUI CommunityToolkit:12.2.0
- OS: Android
- .NET MAUI: 9.xAnything else?
No response
peruchali