Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xamarin.iOS: System.ExecutionEngineException: Attempting to JIT compile method '(wrapper delegate-begin-invoke) System.IAsyncResult System.Func2<Library.SomeDelegate1<EEETestCase.AppDelegate>, bool>:begin_invoke_IAsyncResult__this___T_AsyncCallback_object (Library.SomeDelegate`1<EEETestCase.AppDelegate>,System.AsyncCallback,object)' #14973

Closed
rolfbjarne opened this issue Jun 11, 2019 · 3 comments

Comments

@rolfbjarne
Copy link
Member

rolfbjarne commented Jun 11, 2019

Steps to Reproduce

Run this project on an iOS device: eeetestcase2.zip

This looks very similar to #14972, but the difference is that in this case the offending code has to be in a referenced assembly. If it's included in the executable itself, the code works just fine.

This comes from VSTS #900808.

Current Behavior

An ExecutionEngineException, which is printed to the Application Output:

Got ExecutionEngineException when executing AsyncFire from referenced assembly: System.ExecutionEngineException: Attempting to JIT compile method '(wrapper delegate-begin-invoke) System.IAsyncResult System.Func`2<Library.SomeDelegate`1<EEETestCase.AppDelegate>, bool>:begin_invoke_IAsyncResult__this___T_AsyncCallback_object (Library.SomeDelegate`1<EEETestCase.AppDelegate>,System.AsyncCallback,object)' while running in aot-only mode. See https://docs.microsoft.com/xamarin/ios/internals/limitations for more information.

  at Library.DelegateHelper.AsyncFire[T] () [0x0000e] in <a300b5a252934c4d8462c65d592ee87e>:0 
  at EEETestCase.AppDelegate.FinishedLaunching (UIKit.UIApplication application, Foundation.NSDictionary launchOptions) [0x0002a] in /Users/rolf/Downloads/Archive/EEETestCase/Main.cs:35 

The app also turns red.

Expected Behavior

No ExecutionEngineException (and green screen).

Version Used:

xamarin/xamarin-macios@e89c3271f3c (which is mono/2019-02: bab25c0).

I can also reproduce with the current Xamarin.iOS stable (v12.8.0.2 / d16-0).

@marek-safar
Copy link
Member

@vargaz any ideas why external reference can make a difference here?

/cc @SamMonoRT

@vargaz
Copy link
Contributor

vargaz commented Jul 15, 2019

Wasn't this fixed by the fix for #14972 ?

@rolfbjarne
Copy link
Member Author

This is working in in xamarin-macios/master (a7cb29a4b72405e62100babcc14645a6b6fe207f)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants