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.
Just upgraded to MonoTouch 4.2, and now when running on the iPhone device, OrderBy and GroupBy extensions throw an exception. They were working fine in the previous version.
I have linker set to "Don't Link".
System.ExecutionEngineException: Attempting to JIT compile method 'System.Linq.Check:SourceAndKeySelector (object,object)' while running with --aot-only.
at System.Linq.Enumerable.OrderBy[CalendarEvent,DateTime] (IEnumerable`1 source, System.Func`2 keySelector, IComparer`1 comparer) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq/Enumerable.cs:2148
at System.Linq.Enumerable.OrderBy[CalendarEvent,DateTime] (IEnumerable`1 source, System.Func`2 keySelector) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq/Enumerable.cs:2141
at Startcom.BizApps.DataStore.OnCalendarEventsLoaded (IEnumerable`1 calendarEvents, System.Exception exception) [0x00020] in /Users/macbookair/Dropbox/Projects/Apps/Startcom_BizApps/DataStore.cs:107
at Startcom.GoogleQueryUtilities+<ParseFeedAsync>c__AnonStorey0`1[Startcom.CalendarEvent].<>m__1 (System.Object s, System.ComponentModel.RunWorkerCompletedEventArgs e) [0x00000] in <filename unknown>:0
at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted (System.ComponentModel.RunWorkerCompletedEventArgs e) [0x00000] in <filename unknown>:0
at System.ComponentModel.BackgroundWorker.<CompleteWorker>m__1 (System.Object darg) [0x00000] in <filename unknown>:0
at MonoTouch.UIKit.UIKitSynchronizationContext+<Post>c__AnonStoreyC.<>m__C () [0x00000] in <filename unknown>:0
at MonoTouch.Foundation.NSActionDispatcher.Apply () [0x00000] in <filename unknown>:0
at MonoTouch.UIKit.UIApplication.Main (System.String args, System.String principalClassName, System.String delegateClassName) [0x00000] in <filename unknown>:0
at Startcom.BizApps.IssaquahCoffeeCompany.iOS.Application.Main (System.String args) [0x00000] in /Users/macbookair/Dropbox/Projects/Apps/Startcom_BizApps_IssaquahCoffeeCompany_IOS/Main.cs:14
Using Mono 2.10.5.
This looks very similar to bug #587. Can you
a) try using "Link SDK assemblies" to see if it works;
b) tell us which version of MonoTouch you were used before 4.2;
Linking SDK assemblies fixed it, and previously I was using MonoTouch 4.0.7. Thanks for the quick response
Thanks for confirming the issue. I'll raise the severity of the original bug report.
FWIW you should always use "Link SDK assemblies" for device builds. It makes smaller application and it makes the AOT compilation faster (faster enough so you'll likely build faster when linking).
*** This bug has been marked as a duplicate of bug 587 ***
Thanks - unfortunately, I had to use Don't Link because of another bug I filed: bug 716515. But I can survive with linking for now.
oh, sorry I did not recognize you ;-)
You should still use "Link SDK assemblies" but also add "--linkskip=Mono.Security" to the "extra mtouch arguments" (until a newer MonoTouch gets released with that fix). That should give you about 90% of the linker advantages (without both bugs).