NodeCanvas Forums › Support › [NC2] AoT iOS Jit Error on Startup › Reply To: [NC2] AoT iOS Jit Error on Startup
That solves some of the issues we’re seeing, but not all. We’re still seeing the error I mentioned in my most recent post.
We’ve made some progress by modifying the Read
and Write
functions of fsMetaProperty
to intercept Rects, Keyframes, and AnimationCurves and explicitly getting and setting the appropriate properties. This seems to break some functionality, and I’m not sure why. I’m also not sure why Read
is getting called at runtime, since that seems to be a method related only to serialization.
Matt, I’d be interested for our purposes to see if these errors are PS4-specific. Can you try Gavalakis’s solution and see if you’re also getting the error I have above?
Our version of the fsMetaProperty
methods follows. I will update if we figure out what else is breaking.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
public object Read(object context) { if (context is UnityEngine.Rect) { UnityEngine.Rect r = (UnityEngine.Rect)context; switch (_memberInfo.Name) { case "xMin": return r.xMin; case "yMin": return r.yMin; case "xMax": return r.xMax; case "yMax": return r.yMax; default: return null; } } else if (context is UnityEngine.Keyframe) { UnityEngine.Keyframe a = (UnityEngine.Keyframe)context; switch (_memberInfo.Name) { case "inTangent": return a.inTangent; case "outTangent": return a.outTangent; case "tangentMode": return a.tangentMode; case "time": return a.time; case "value": return a.value; default: return null; } } else if (context is UnityEngine.AnimationCurve) { UnityEngine.AnimationCurve a = (UnityEngine.AnimationCurve)context; switch (_memberInfo.Name) { case "keys": return a.keys; case "length": return a.length; case "postWrapMode": return a.postWrapMode; case "preWrapMode": return a.preWrapMode; default: return null; } } else if (_memberInfo is PropertyInfo) { object ret; try { ret = ((PropertyInfo)_memberInfo).GetValue(context, new object[] { }); } catch (Exception e) { UnityEngine.Debug.LogError("|||||||||||||||||||||||||||||||||||||||"); UnityEngine.Debug.LogError("Error reading property. Is this a value-type?"); UnityEngine.Debug.LogError(context); UnityEngine.Debug.LogError(_memberInfo.Name); UnityEngine.Debug.LogError(e); UnityEngine.Debug.LogError("|||||||||||||||||||||||||||||||||||||||"); throw e; } return ret; } else { return ((FieldInfo)_memberInfo).GetValue(context); } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
public void Write(object context, object value) { var field = _memberInfo as FieldInfo; var property = _memberInfo as PropertyInfo; if (field != null) { field.SetValue(context, value); } else if (context is UnityEngine.Rect) { UnityEngine.Rect r = (UnityEngine.Rect)context; switch (_memberInfo.Name) { case "xMin": r.xMin = (float)value; break; case "yMin": r.yMin = (float)value; break; case "xMax": r.xMax = (float)value; break; case "yMax": r.yMax = (float)value; break; } } else if (context is UnityEngine.Keyframe) { UnityEngine.Keyframe a = (UnityEngine.Keyframe)context; switch (_memberInfo.Name) { case "inTangent": a.inTangent = (float)value; break; case "outTangent": a.outTangent = (float)value; break; case "tangentMode": a.tangentMode = (int)value; break; case "time": a.time = (float)value; break; case "value": a.value = (float)value; break; } } else if (property != null) { var setMethod = property.GetSetMethod(/*nonPublic:*/ true); if (setMethod != null) { try { setMethod.Invoke(context, new object[] { value }); } catch (Exception e) { UnityEngine.Debug.LogError("|||||||||||||||||||||||||||||||||||||||"); UnityEngine.Debug.LogError("Error writing property. Is this a a value-type?"); UnityEngine.Debug.LogError(context); UnityEngine.Debug.LogError(setMethod.Name); UnityEngine.Debug.LogError(_memberInfo.Name); UnityEngine.Debug.LogError(value); UnityEngine.Debug.LogError(e); UnityEngine.Debug.LogError("|||||||||||||||||||||||||||||||||||||||"); throw e; } } } } |