Closed thanigaiharan closed 2 years ago
@thanigaiharan Hi. It seems to me that you are facing memory leaks. Have you tried using Xamarin Profiler or subscribing to ReceiveMemoryWarning
? 200 photos is quite a lot. On which line does the app crash?
@dimonovdd Thanks for your quick reply. The app crashes in "var photo = await MediaGallery.CapturePhotoAsync();". If this method call throws exception if there is a memory leak then we can catch and avoid the app crash.
@dimonovdd when we call "await MediaGallery.CapturePhotoAsync()" method it shows the
The app crashes exactly when I click on the Shutter button to take photo. Appreciate your help on this.
I do not know how to help, I will not be able to test it. I have iPhone 12 mini and 13 Pro. I will have to take more than 400 photos every time. Could you provide more information? For example, you can collect logs from an iPhone using Console app on Mac
@dimonovdd I am getting this error in console log when ever I click on the Shutter button after I call "await MediaGallery.CapturePhotoAsync()".
error 01:57:52.245770+0800 AppName findWriterForTypeAndAlternateType:119: unsupported file format 'public.heic'
Does this help?
@dimonovdd When I checked with the Xcode Profiler. Below is the screen shots
@thanigaiharan Can you email me the full logs from native logs from Xcode or Console?
1) Have you used Essentials? is there such this issue? 2) Did you also get this crash in debug or in release builds?
@thanigaiharan You can find the device logs in Xcode -> Window -> Devices and Simulators -> View Device Logs I hope that today or tomorrow you will send more information. I would like to try to help you with it tomorrow.
@dimonovdd sent email with the crash logs and details.
200 images is pretty high for normal usage. I thihk that you should report this issue to Apple. You can specify that UIImagePickerController is used to capture photos.
If you write to apple, please let us know about the progress of solving the problem here
@dimonovdd When we capture the photo and show the preview with 'Use photo' and 'Retake' option (as shown in below screenshot), are we using the UIImageViewer . If so are you setting the new Image(filename) or UIImage.FromFile(filepath)?
When we capture the photo and show the preview with 'Use photo' and 'Retake' option (as shown in below screenshot), are we using the UIImageViewer
No this is the native behavior of UIImagePickerController
.
All the project sources are in this repository. You can watch it.
2) PhotoFile
I'm wondering if there are any updates on this?
Description
we are using this nuget in Xamarin.ios application. Our application is a Fleet management application where we used to do inspection for multiple vehicle tires . While doing inspection we take multiple photos for tires (around 200 photos for one vehicle). While doing so the app crashes in "await MediaGallery.CapturePhotoAsync()". we are unable to handle this exception and even the crash log is not reported in Testflight. Due to this crash we are losing the inspection data and user need to do inspection again. Appreciate the help to fix this issue soon.
Actual Behavior
App Should not crash.
Expected behavior
App crashes in iPad Pro (120 photos) , Iphone XR (around 300 photos), iPhone 11 Pro (400 photos)
Code snippet
Steps to reproduce the behavior
Screenshots or Videos
Reproduction Link
Configuration