ExecutionEngineException: Attempting to JIT compile method 'System.Reflection.MonoProperty:GetterAdapterFrame

最近在做JsonFx移植到Unity3d的工作,

StandAlone版已测可用,但是在iOS上使用JsonWriter.Serialization时出现如下错误:

ExecutionEngineException: Attempting to JIT compile method 'System.Reflection.MonoProperty:GetterAdapterFrame<UniSocial.Weibo.Entities.PrivacyEntity, int> (System.Reflection.MonoProperty/Getter`2<UniSocial.Weibo.Entities.PrivacyEntity, int>,object)' while running with --aot-only.
跟踪进去后发现问题出在PropertyInfo.GetValue()上,
解决方法:
用PropertyInfo.GetGetMethod().Invoke(object, arguments);替代PropertyInfo.GetValue();
posted @ 2012-10-07 16:09  icecryed  阅读(1776)  评论(0编辑  收藏  举报