Xamarin MediaPicker CapturePhotoAsync restarting the app after pressing "Ok" button - happens only on some devices

Bruno Porto 1 Reputation point
2021-10-27T19:27:49.843+00:00

Hi!

I have been experiencing an error while using the XamarinEssentials.MediaPicker CapturePhotoAsync() method. Some users of an application of mine have been going through silent crashes that restarts the app without logging anything to the appCenter right after accepting the picture that was taken. (video of the error attatched here ). Note that this video was taken by a user that holds a Xiami Redmi Note 9S and I do not have access to this device. I could not manage to reproduce this error on any device that I have tested. Not in development Mode nor Release.

Appearently it is some bug going inside MediaPicker code that consumes all the available RAM of the device, forcing it to restart.

I have seen a lot of other reports on the internet but any of them would come up with a conclusion or a solution.

Can someone help me fix this issue?

Thanks in advance!

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,287 questions
{count} votes