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 am getting JIT exceptions in various places when starting my app. This is an example:
I really don't know how to work around this one by changing my code since the problem appears in so many functions. I tried removing several method calls just to see my app up on the screen for a change, but I just keep getting various JIT exceptions.
One case I forgot to mention: I'm using Monotouch 4.2
There are a few reasons for that, most of them listed in:
The most common one, for LINQ, is the use of value-types in generics (even if hidden inside the LINQ expression). See bug #760 for an example. We can likely help to find workarounds for most cases.
I eventually managed to get around this bug by removing all LINQ from my source code. I tried just removing the bit that could not be compiled, rerun the app, repeat first, but after a few hours it became apparent that almost no LINQ code in my app can be compiled at all (only exception I noticed: LINQ2XML). So it was easier to remove everything instead.
What made this really annoying is that there isn't even a warning when running the same app in the emulator. So I wrote a lot of incompatible code when I was still running the demo version of Monotouch, only to have to strip it out again once I was running the app on my actual iPhone device.
I would highly suggest removing Linq entirely from monotouch by default and just make it possible to switch it on for developers who feel adventurous. Right now LINQ support is so broken that it probably does more harm than it is of any use.
The 6.3.x beta releases have much improved to avoid this situation (the EngineExecutionException). You might want to try this, or similar code, again and report any remaining issues (with a test case).