playMaker

Author Topic: iOS JIT issue with Actions.GetProperty  (Read 8148 times)

thinias1900

  • Playmaker Newbie
  • *
  • Posts: 4
iOS JIT issue with Actions.GetProperty
« on: January 15, 2014, 03:39:29 PM »
When I attempt to run my application on the iOS platform only, I get the following exception attempting to run a PlayMaker flow involving the GetProperty action:

ExecutionEngineException: Attempting to JIT compile method '(wrapper delegate-invoke) System.Reflection.MonoProperty/Getter`2<Interaction, UnityEngine.GameObject>:invoke_GameObject__this___Interaction (Interaction)' while running with --aot-only.

  at System.Reflection.MonoProperty.GetterAdapterFrame[Interaction,GameObject] (System.Reflection.Getter`2 getter, System.Object obj) [0x00000] in <filename unknown>:0
  at System.Reflection.MonoProperty.GetValue (System.Object obj, System.Object[] index) [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.ReflectionUtils.GetMemberValue (System.Reflection.MemberInfo member, System.Object target) [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.ReflectionUtils.GetMemberValue (System.Reflection.MemberInfo[] memberInfo, System.Object target) [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.FsmProperty.GetValue () [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.Actions.GetProperty.OnUpdate () [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.FsmState.OnUpdate () [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.Fsm.UpdateState (HutongGames.PlayMaker.FsmState state) [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.Fsm.Update () [0x00000] in <filename unknown>:0
  at PlayMakerFSM.Update () [0x00000] in <filename unknown>:0
 
(Filename:  Line: -1)



My understanding of this issue is that MonoProperty.GetValue() requires JIT reflection when executed under a .NET 2.0 runtime (it may have worked under .NET 1.1).  This presents a problem on AOT platforms, such as iOS, which don't support any form of dynamic compilation.  I have looked at other threads on this forum and google, and have verified the following settings:

Stripping Level: Disabled (my understanding is that this makes "link.xml" settings irrelevant).

Script Call Optimization: Slow and Safe

SymLink Unity Libraries: Enabled



I've found other method calls in the place of MonoProperty.GetValue() that would ostensibly accomplish the same purpose... but unfortunately the source for that function is under PlayMaker.dll, and I can't modify it.  I have been unable to find a workaround for this issue, occurring on iOS only.  Does anyone have any insight?

Thanks
« Last Edit: January 15, 2014, 03:42:05 PM by thinias1900 »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: iOS JIT issue with Actions.GetProperty
« Reply #1 on: January 15, 2014, 05:35:54 PM »
Is it a specific property that's failing? Or any usage of GetProperty? I'll run some tests here too...

thinias1900

  • Playmaker Newbie
  • *
  • Posts: 4
Re: iOS JIT issue with Actions.GetProperty
« Reply #2 on: January 15, 2014, 08:36:45 PM »
I was able to resolve this issue by setting my Api Compatibility level from .NET 2.0 to .NET 2.0 Subset.  PlayMaker appears to have a compatibility issue on the iOS platform when using the full .NET 2.0 assemblies.

alexlange

  • Playmaker Newbie
  • *
  • Posts: 16
Re: iOS JIT issue with Actions.GetProperty
« Reply #3 on: January 31, 2014, 01:51:29 AM »
Yes, I met this too. PlayMaker works good on desktop, but fail on ios. It thorws like below in XCode5.
* Using the latest version import from assets store today
** Trying to change comp-level to .NET subset now, but unfortunately there're too many refs using full .NET in my project.

Code: [Select]

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



  at System.Reflection.MonoProperty.GetterAdapterFrame[GameObject,GameObject] (System.Reflection.Getter`2 getter, System.Object obj) [0x00000] in <filename unknown>:0

  at System.Reflection.MonoProperty.GetValue (System.Object obj, System.Object[] index) [0x00000] in <filename unknown>:0

  at HutongGames.PlayMaker.ReflectionUtils.GetMemberValue (System.Reflection.MemberInfo member, System.Object target) [0x00000] in <filename unknown>:0

  at HutongGames.PlayMaker.ReflectionUtils.GetMemberValue (System.Reflection.MemberInfo[] memberInfo, System.Object target) [0x00000] in <filename unknown>:0

  at HutongGames.PlayMaker.FsmProperty.GetValue () [0x00000] in <filename unknown>:0

  at HutongGames.PlayMaker.Actions.GetProperty.OnEnter () [0x00000] in /Users/MyPathOnMAC/Assets/PlayMaker/Actions/GetProperty.cs:24

  at HutongGames.PlayMaker.FsmState.ActivateActions (Int32 startIndex) [0x00000] in <filename unknown>:0

  at HutongGames.PlayMaker.FsmState.OnEnter () [0x00000] in <filename unknown>:0

  at HutongGames.PlayMaker.Fsm.EnterState (HutongGames.PlayMaker.FsmState state) [0x00000] in <filename unknown>:0

  at HutongGames.PlayMaker.Fsm.SwitchState (HutongGames.PlayMaker.FsmState toState) [0x00000] in <filename unknown>:0

  at HutongGames.PlayMaker.Fsm.UpdateStateChanges () [0x00000] in <filename unknown>:0

  at HutongGames.PlayMaker.Fsm.UpdateState (HutongGames.PlayMaker.FsmState state) [0x00000] in <filename unknown>:0

  at HutongGames.PlayMaker.Fsm.Update () [0x00000] in <filename unknown>:0

  at PlayMakerFSM.Update () [0x00000] in <filename unknown>:0

 

(Filename: /Users/MyPathOnMAC/Assets/PlayMaker/Actions/GetProperty.cs Line: 24)



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



  at System.Reflection.MonoProperty.GetterAdapterFrame[GameObject,GameObject] (System.Reflection.Getter`2 getter, System.Object obj) [0x00000] in <filename unknown>:0

  at System.Reflection.MonoProperty.GetValue (System.Object obj, System.Object[] index) [0x00000] in <filename unknown>:0

  at HutongGames.PlayMaker.ReflectionUtils.GetMemberValue (System.Reflection.MemberInfo member, System.Object target) [0x00000] in <filename unknown>:0

  at HutongGames.PlayMaker.ReflectionUtils.GetMemberValue (System.Reflection.MemberInfo[] memberInfo, System.Object target) [0x00000] in <filename unknown>:0

  at HutongGames.PlayMaker.FsmProperty.GetValue () [0x00000] in <filename unknown>:0

  at HutongGames.PlayMaker.Actions.GetProperty.OnUpdate () [0x00000] in /Users/MyPathOnMAC/Assets/PlayMaker/Actions/GetProperty.cs:34

  at HutongGames.PlayMaker.FsmState.OnUpdate () [0x00000] in <filename unknown>:0

  at HutongGames.PlayMaker.Fsm.UpdateState (HutongGames.PlayMaker.FsmState state) [0x00000] in <filename unknown>:0

  at HutongGames.PlayMaker.Fsm.Update () [0x00000] in <filename unknown>:0

  at PlayMakerFSM.Update () [0x00000] in <filename unknown>:0

 

(Filename: /Users/MyPathOnMAC/PlayMaker/Actions/GetProperty.cs Line: 34)
« Last Edit: January 31, 2014, 05:04:42 AM by alexlange »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: iOS JIT issue with Actions.GetProperty
« Reply #4 on: January 31, 2014, 07:14:55 AM »
Hi,

 yes, Custom action that access these properties will solve this issue. Basically you should avoid using Set and Get property actions to be IOS compatible with these settings.

bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: iOS JIT issue with Actions.GetProperty
« Reply #5 on: September 10, 2015, 12:28:22 PM »
Hi,

 I made a system to solve these problems. so now you'll be fine using these actions.

 Bye,

 Jean