Author Topic: JIT compile method error!  (Read 4698 times)

fantast_xu

  • Guest
JIT compile method error!
« on: June 11, 2013, 06:59:09 AM »
Hi all
Here is the situation a met: I was trying to use TNAutoSync to sync gameObject's UnityEngine.Transform's global position and local rotation properties. It's all fine when I tried on PC and Mac, but when I made a build to iOS, I got these errors from xcode:

Jun 11 19:39:38 Bowies-new-iPad ProductName[876] <Warning>: ExecutionEngineException: Attempting to JIT compile method 'System.Reflection.MonoProperty:GetterAdapterFrame<UnityEngine.Transform, UnityEngine.Vector3> (System.Reflection.MonoProperty/Getter`2<UnityEngine.Transform, UnityEngine.Vector3>,object)' while running with --aot-only.
   
     at System.Reflection.MonoProperty.GetValue (System.Object obj, System.Object[] index) [0x00000] in <filename unknown>:0
     at TNAutoSync.Awake () [0x00000] in <filename unknown>:0
   UnityEngine.Object:INTERNAL_CALL_Internal_InstantiateSingle(Object, Vector3&, Quaternion&)
   UnityEngine.Object:Internal_InstantiateSingle(Object, Vector3, Quaternion)
   UnityEngine.Object:Instantiate(Object, Vector3, Quaternion)
   TNManager:OnCreateObject(Int32, Int32, UInt32, BinaryReader)
   TNet.GameClient:ProcessPacket(Buffer, IPEndPoint)
   TNet.GameClient:ProcessPackets()
   TNManager:Update()

I know TNAutoSync is for test or prototype, does this mean that I can't use it on real ios devices or android devices because of mono reflection limitation?

I had already set "Api Compatibility Level" to .Net 2.0(Not .Net 2.0 subset) and "Stripping Level" to Disabled


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: JIT compile method error!
« Reply #1 on: June 11, 2013, 12:48:38 PM »
Why 2.0? It defaults to 2.0 subset, and there is no reason to change it as far as I know.

BLOOD585

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: JIT compile method error!
« Reply #2 on: December 15, 2015, 04:02:11 AM »
Hello!
День добрый!

Hello! I get a lot of similar mistakes in iOS.
Получаю очень много аналогичных ошибок на IOS.


MESSAGE
ExecutionEngineException: Attempting to JIT compile method '(wrapper delegate-invoke) System.Reflection.MonoProperty/Getter`2<UnityEngine.UI.Image, UnityEngine.Sprite>:invoke_Sprite__this___Image (UnityEngine.UI.Image)' while running with --aot-only.

STACK TRACE
System.Reflection.MonoProperty.GetterAdapterFrame[Image,Sprite] (System.Reflection.Getter`2 getter, System.Object obj)
System.Reflection.MonoProperty.GetValue (System.Object obj, System.Object[] index)
PropertyReference.Get ()
PropertyBinding.UpdateTarget ()
PropertyBinding.FixedUpdate ()



I'm using Net 2.0, because it is needed for building il2cpp. Are there any options to fix this problem?
Так же использую Net 2.0, потому что он необходим при сборке il2cpp. Есть какие то варианты исправить проблему?

I use Unity 4.6.9f1 и NGUI 3.9.1
Использую Unity 4.6.9f1 и NGUI 3.9.1
« Last Edit: December 15, 2015, 04:08:56 AM by BLOOD585 »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: JIT compile method error!
« Reply #3 on: December 15, 2015, 10:10:52 AM »
This support forum is for TNet, while your post is about NGUI -- and an old version at that. My first response is always "please update to the latest version first".

Also if you look at the stack trace it shows you that the issue is in reflection, you having some property binding reference to a UnityEngine.UI.Image /  UnityEngine.Sprite, which is not NGUI.