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.
I suspect that this is something that might be fixable only on your end. Not 100% sure though so please ignore if you think it's a problem with my code.
I have a MKMapView on my application and I got this monotouch exception recently. It's the only time me or anyone else has gotten this exception. It happened shortly after reactivating the app from the button apps menu of the iphone.
MonoTouch.Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInvalidArgumentException Reason: -[__NSCFArray mapView:didUpdateUserLocation:]: unrecognized selector sent to instance 0xc34190
at MonoTouch.UIKit.UIApplication.Main (System.String args, System.String principalClassName, System.String delegateClassName) [0x00000] in <filename unknown>:0
at PinMaster.Application.Main (System.String args) [0x00000] in <filename unknown>:0
This looks like an (managed) instance of MKMapView got garbage collected. It's likely that your application does not keep a reference to some instance (of MKMapView) and that, later on, the native side tries to call it (the disposed instance).
A common pattern is using a local variable (that gets collected once it goes out of scope) and having events that use this local variable. The solution is to "promote" this local variable into a field, ensuring it will be "alive" as long as the type (and the associated events) are.
If this does not solve your problem then we'll need a test case (or access to your application code) to help you find the issue.
Well its not one of those cases as the mkmapview is on the main view of the application and that view is designed with the interface builder.
I havent had this error again so its not a big deal. Initially i feared it was something that got broken with the new monotouch release. But.....false alarm
Keep up the good work
Thanks. Please re-opn the bug (with a test case) if you're able to duplicate this in the future.