iOS App Store ExecutionEngineException attempting to JIT compile

元气小坏坏 提交于 2019-12-24 04:14:50

问题


I have a really awkward problem. I have build my app for iOS and tested it on all emulators and it works fine. I have installed it on a device (iPhone 6 plus) and that works fine as well. However, when I submit it to the app store, the feedback is that it crashes on launch on all devices. The crash log attached shows this error;

Unhandled Exception:
    System.ExecutionEngineException: Attempting to JIT compile method 'GalaSoft.MvvmLight.Messaging.Messenger:get_Default ()' while running with --aot-only. See http://docs.xamarin.com/ios/about/limitations for more information.

The code that causes this error is in ViewWillAppear;

Messenger.Default.Register<LoggedInFailedMessage>(this, LoginFailed);
Messenger.Default.Register<LoggedInMessage>(this, LoggedIn);

The below stack overflow thread seems to indicate it might be caused by using value types, but I am using reference types.

System.ExecutionEngineException: Attempting to JIT compile method only in Debug Mode on device (MonoTouch)

Any ideas would be greatly appreciated! I don't know how I can test for these errors if they work when i debug on emulator and device but fail when apple test it.


回答1:


Most of those issues where fixed a long time ago. Make sure your options for the AppStore builds (or the one you used to submit) match the one you're testing (e.g. Debug builds).

In particular make sure that the Enable generic value type sharing options is ON on the build you are submitting. This will include some extra code to ensure all value types code path variants are available at runtime.

Note that this setting should already be ON by default. Still it's a good practice to ensure your debugging/release settings are mostly (except debugging stuff) identical. Otherwise you risk testing different code, locally, than what you're submitting to the store.



来源:https://stackoverflow.com/questions/28123471/ios-app-store-executionengineexception-attempting-to-jit-compile

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!