Bug 21986 - Failed assertion during AOT. (...mono/mono/mini/method-to-ir.c:6944, condition `!sig->has_type_parameters' not met)
Summary: Failed assertion during AOT. (...mono/mono/mini/method-to-ir.c:6944, conditi...
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools ()
Version: 7.9.1.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2014-08-10 23:01 UTC by Brian Berry
Modified: 2014-08-11 10:18 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:

Description Brian Berry 2014-08-10 23:01:30 UTC
Found: Failed assertion during AOT of a Xamarin.iOS app:

* Assertion at ../../../../../mono/mono/mini/method-to-ir.c:6944, condition `!sig->has_type_parameters' not met
error MT3001: Could not AOT the assembly '<path-to-one-of-my-assemblies>/<assembly>.exe'


Version: (Indie Edition)
Hash: fef687c

   * The app in question builds/runs in its current state under:
        Xamarin.Android, Xamarin.Mac, Windows (desktop), Windows 8.1 (store), Windows 8.1 (phone).
   * A clean rebuild did not resolve the issue.
   * A fairly limited change set from building to not building, so I will of course attempt to isolate / get more info.

I'll add more when I have it.
Comment 2 Sebastien Pouliot 2014-08-11 08:37:12 UTC
It's the first case, i.e. this is a known AOT limitation [1]. 

It works on other platforms because they are all using the JIT (not the AOT) compiler. There are no immediate plan to fix this, but it's part of the list of things we know about.

[1] P/Invokes in Generic Types, http://developer.xamarin.com/guides/ios/advanced_topics/limitations/
Comment 3 Brian Berry 2014-08-11 10:18:13 UTC
Thanks for the words and reference.

I'd suggest, at a minimum, this is an opportunity to have the AOT compiler at least emit an informative error stating non-support of generics in the detected case (even cite that URL) so that users may have a better chance at self-diagnosis.   I had a pretty good guess since I had just added a small amount of code myself, but I can also envision cases where a user has just taken a drop of some source in bulk and ends up rather puzzled as to where to look.