Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 10691 [details]
The attached project reproduces an issue where an image picker preview of an image will be all black. This is slightly different than Bug #24098 because it is _before_ a picture is taken.
**Steps to Reproduce:**
1. Run the attached sample on an iOS Device (Tested with an iPhone 5s)
2. Press the button and choose Take a Picture
3. Capture a photo and press Use Photo
4. Repeat 2-3 about 3 times or until the preview is black.
The camera preview will be black. You can still take a photo and that preview will be OK.
The live camera preview should not be black.
**Build Date & Platform:**
Classic API only
Using the Unified API does not reproduce this.
There is no button in the app (it seems to be a Photo filter extension, with a dummy app; did you attach the correct test case?)
Yes, this is the correct project. Are you sure you opened the correct solution?
This is what I am seeing: http://screencast.com/t/OLx3slmty
Created attachment 10715 [details]
OK, my bad, I somehow managed to open the wrong folder.
This is an iOS bug, I can reproduce it with an Xcode project. The problem is the viewController argument to the [Did|Will]ShowViewController events - when ObjC calls us for those methods, we'll automatically create a ViewController instance for the argument, which lives until the next GC, but somehow the UIImagePickerController expects those view controllers to be freed timely.
A potential workaround is to not use any events, but the Delegate property instead (see attached TestImagePickerViewController.cs for an example).
I've also fixed it in Xamarin.iOS so that the workaround won't be required in the future.