MonoTouch:使用ServiceStack导致JIT错误? [英] MonoTouch: Using ServiceStack caused JIT error?

查看:97
本文介绍了MonoTouch:使用ServiceStack导致JIT错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 https://的MonoTouch构建的Service Stack. github.com/ServiceStack/ServiceStack/tree/master/release/latest/MonoTouch

在iPad上运行时,出现 JIT 错误.我以为MonoTouch会在构建过程中解决这个问题?

When run on a iPad, I get a JIT error. I thought MonoTouch took care of that in the build?

Attempting to JIT compile method     
'ServiceStack.Text.Json.JsonReader`1<Common.AppCategoryEnum>:GetParseFn ()' while running 
with --aot-only.

我使用DLLS:

  • ServiceStack.Common.dll
  • ServiceStack.Interface.dll
  • ServiceStack.Text.dll

仅此一次通话:

new JsonServiceClient ().GetAsync<MyResponse> (url, Success, Failure);

推荐答案

我正在使用Service Stack的MonoTouch构建版本

I am using the MonoTouch build of Service Stack from

这些.dll已有3个多月的历史了,出现了一个类似问题在一个月前找到并修复.

Those .dll are more than 3 months old and a similar issue was found and fixed one month ago.

我收到一个JIT错误.我以为MonoTouch会在构建过程中解决这个问题?

I get a JIT error. I thought MonoTouch took care of that in the build?

是的.为MonoTouch构建时,将使用AOT(提前)编译器.它会在运行时知道所需的所有内容进行编译.

Yes. When building for MonoTouch the AOT (ahead of time) compiler is used. It compiles everything it knows it will require at runtime.

但是,有时AOT编译器不能了解所有内容(例如通用虚拟方法)编译所有可能的变体(例如值类型).请参阅文档网站中的通用限制.在这种情况下,它的AOT编译器可能需要帮助(签名将确保编译正确的代码,例如

However sometimes the AOT compiler cannot know everything (e.g. generic virtual methods) or compile every possible variations (e.g. value types). See the section generic limitations in the documentation web site. In such case it AOT compiler might need help (a signature that will ensure the right code will be compiled, e.g. something like this).

这也可能是一个错误-由于某种原因未对所需方法进行AOT.发现该错误后,在运行时将发生异常,因为缺少代码并且无法使用JIT来提供它.

It can also be a bug - where a required method was not AOT'ed for some reason. When this is discovered, at runtime, an exception will occurs because the code is missing and the JIT cannot be used to provide it.

这篇关于MonoTouch:使用ServiceStack导致JIT错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆