Bug 9158 - System.ExecutionEngineException: Attempting to JIT compile method
Summary: System.ExecutionEngineException: Attempting to JIT compile method
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: 6.0.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2012-12-28 19:38 UTC by twin
Modified: 2013-01-09 10:10 UTC (History)
2 users (show)

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

Sample project to illustrate the 'Attempting to JIT compile method' exception (2.87 MB, application/octet-stream)
2012-12-28 19:41 UTC, twin

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 twin 2012-12-28 19:38:29 UTC
Please find attached sample project to illustrate the error. All works fine on the iPhoneSimulator but when tested on a device the error as stated below occur. 

The development environment is:
- Mac OS X 10.7.5
- MonoDevelop 3.0.5
- Monotouch: 6.0.6
- iOS 6.0.1 (10A525) iPhone 5

System.ExecutionEngineException: Attempting to JIT compile method 'Catnap.Mapping.Impl.EntityMap`1<Catnap.Tests.Core.Models.Person>:Property<bool> (System.Linq.Expressions.Expression`1<System.Func`2<Catnap.Tests.Core.Models.Person, bool>>)' while running with --aot-only. See http://docs.xamarin.com/ios/about/limitations for more information.

  at Catnap.Tests.Core.DomainMapping.<Get>m__1 (IEntityMappable`1 e) [0x000aa] in /Users/twin/GitHubRepos/catnap/src/Catnap.Monotouch.Test/DomainMapping.cs:20
  at Catnap.Mapping.Impl.EntityMap`1[Catnap.Tests.Core.Models.Person]..ctor (System.Action`1 propertyMappings) [0x00000] in <filename unknown>:0
  at Catnap.Mapping.Impl.DomainMap.Entity[Person] (System.Action`1 propertyMappings) [0x00000] in <filename unknown>:0
  at Catnap.Tests.Core.DomainMapping.<Get>m__0 (IDomainMappable d) [0x00000] in /Users/twin/GitHubRepos/catnap/src/Catnap.Monotouch.Test/DomainMapping.cs:17
  at Catnap.Configuration.Impl.Configurator.Build () [0x0002d] in /Users/twin/GitHubRepos/catnap/src/Catnap.Monotouch/Configuration/Impl/Configurator.cs:48
  at Catnap.MonoTouch.Test.AppDelegate.Handle_btnNormal (System.Object sender, System.EventArgs e) [0x00000] in /Users/twin/GitHubRepos/catnap/src/Catnap.Monotouch.Test/AppDelegate.cs:61
  at MonoTouch.UIKit.UIControlEventProxy.Activated () [0x00000] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIControl.cs:30
  at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38
  at Catnap.MonoTouch.Test.Application.Main (System.String[] args) [0x00000] in /Users/twin/GitHubRepos/catnap/src/Catnap.Monotouch.Test/Main.cs:17
Comment 1 twin 2012-12-28 19:41:44 UTC
Created attachment 3141 [details]
Sample project to illustrate the 'Attempting to JIT compile method' exception
Comment 2 twin 2013-01-09 10:10:02 UTC
I changed the status to RESOLVED - INVALID because it appears that it was a combination of the MonoTouch limitations and the code of Catnap. Nevertheless, the issue is resolved by this pull request on GitHub. https://github.com/timscott/catnap/pull/16