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.
Right now when MT finds a wrapper type without its corresponding objc class we throw on Device and ignore on simulator.
A better approach would be to hookup into the runtime loader and register only when the vtable is requested or explicitly needed.
This would give us a neat startup boost and close the gap between device and simulator builds.
Besides that, failing to load a type kind of make sense. It reduces the surface for weird crashes as nothing can use those broken types for very long. And the TLE will probably result in the app aborting as it's expected to.
XIB files can reference user types. We can overcome that by registering empty classes and installing an init method that performs registration.
I'm not entirely sure we can throw when the type is registered (if we register everything at startup), because it is allowed to have wrapper types in the app without corresponding native types (an app may for instance have iOS6-only types, but still execute gracefully on iOS5).
Maybe we can add debug code to monotouch.dll and make it so that it's only used in debug mode (i.e. a separate monotouch.dll and monotouch-debug.dll, like we already have for libmonotouch.a).
IIRC this was implemented some time ago.