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 5660 [details]
If you use a dynamic Delegate with UIAlertDialog, application crash when user click on OK button.
Workaround : use delegate as member of the class.
See attached example : Clicking on "Click Me" and then "OK" work fine : Delegate is a member of the ViewController.
Then, click on "Crash me" and then "OK" : application crash because Delegate is dynamically created.
This is sort of expected - you must make sure managed objects aren't freed before native code is finished with them.
In the crashing example the managed GC does not know that native code is still using the UIAlertView, and will thus the UIAlertViewDelegate (which only the UIAlertView references). And when you click the button, UIAlertView will try to call the "Clicked" method on the freed UIAlertViewDelegate.