roycornelissen/GMImagePicker.Xamarin

Crash when adding photos to the library.

Closed this issue · 5 comments

It looks like this control has the same issue as the native iOS version, but I can't figure out what is causing it.

My users take lots of screenshots, and it is causing this crash.

guillermomuntaner/GMImagePicker#88

Thoughts?

Finally had time to figured this one out. In the ViewWillDisappear you are only Unregistering the Photopic early changes if the Picker is part of the Navigation stack. I changed it to always Unregister and the crash stopped happening. Not sure if this is the best way to handle it but it seems to work.

@alexrfan03 sorry for the late response... crazy busy at work... Do you have a PR with this change? I can merge it. Sounds like a good solution.

@alexrfan03 I think I just fixed this issue by pushing a fix for #31. Can you verify using version 2.2.2 of the Nuget package?

@roycornelissen, It is still now working on iPad with OS version 9.4.
Exception Details:

0x0000000101964684 0x000000010194c4fc 0x00000001012cb9a0 0x0000000101237d0c 0x0000000101237ccc 0x0000000100732e94 0x0000000100a756c8 0x00000001019b96ec 0x0000000101a21440 0x0000000101a26644 0x00000001019a1ccc 0x0000000101ac20e8 0x000000010061a5c4
*** Terminating app due to uncaught exception 'NSGenericException', reason: 'UIPopoverPresentationController (<UIPopoverPresentationController: 0x112d88b30>) should have a non-nil sourceView or barButtonItem set before the presentation occurs.'

@NeerajRai111 I'm having trouble reproducing this crash. Do you have a basic sample project that demonstrates the error? Can you reproduce it with the sample app in this repo too?