jacobdufault / fullinspector

Full Inspector supercharges Unity's inspector
MIT License
110 stars 27 forks source link

AOT exception on 2.6.2 with Unity 4.6.7f1 #128

Closed neosparticus closed 8 years ago

neosparticus commented 9 years ago

Since I updated to 2.6.2, I'm getting an AOT error upon deserialization on IOS devices. It happens when a BaseBehavior has a public field which is an interface type, where the interface's implementation has a public value-type auto property (like int or bool). I've traced the issue to some new code in fsReflectedConverter.TryDeserialize line 66. There is a huge TODO comment block just above the problem code.

Here is an example project that will trigger the issue if you deploy to an iPhone... (snip)

Here is a partial stack trace... System.ExecutionEngineException: Attempting to call method 'System.Reflection.MonoProperty::GetterAdapterFrame' for which no ahead of time (AOT) code was generated. at System.Reflection.MonoProperty+GetterAdapter.Invoke (System.Object _this) [0x00000] in :0 at System.Reflection.MonoProperty.GetValue (System.Object obj, System.Object[] index) [0x00000] in :0 at FullSerializer.Internal.fsMetaProperty.Read (System.Object context) [0x00000] in :0 at FullSerializer.Internal.fsReflectedConverter.TryDeserialize (FullSerializer.fsData data, System.Object& instance, System.Type storageType) [0x00000] in :0

jacobdufault commented 9 years ago

Ok, I'll take a look. Please take down the uploaded folder though, since it contains FI :). I've downloaded it.

jacobdufault commented 9 years ago

So I'm not sure how much I can do here. I think there are a few options though for you to work around the AOT limitations:

jacobdufault commented 8 years ago

Closing since this is a Full Serializer bug. Likely caused due to missing stripping.xml information. Please reopen if this is still occurring.

The TODO in fsReflectedConverter is for a future performance enhancement.