News Forums RAIN General Discussion and Troubleshooting Errors after upgrading RAIN

Tagged: 

This topic contains 3 replies, has 2 voices, and was last updated by  Sigil 1 year, 6 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #33556

    hoodoo
    Participant

    I’m using RAIN 2.1.2 with my project. I have several different enemy characters that use legacy animation clips with RAIN. Everything works great in this version.

    When I upgrade to the newest version, I get a bunch of errors and now a Unity crash on the last attempt.

    Full Log File: https://drive.google.com/file/d/0B4mrrYpS5ed7TDVqSjA4LXQ5anc/view?usp=sharing

    The errors look like this:

    ArgumentException: Object type UnityEngine.Transform cannot be converted to target type: UnityEngine.AnimationClip
    Parameter name: val
      at System.Reflection.MonoField.SetValue (System.Object obj, System.Object val, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Globalization.CultureInfo culture) [0x00063] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoField.cs:133 
      at System.Reflection.FieldInfo.SetValue (System.Object obj, System.Object value) [0x00000] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/FieldInfo.cs:150 
      at RAIN.Serialization.FieldSerializer.DeserializeClassFromElement (RAIN.Serialization.ObjectElement aParent, System.Object aObject) [0x00000] in <filename unknown>:0 
      at RAIN.Serialization.FieldSerializer.DeserializeReferenceFromElement (Int32 aRefIndex, System.Type aType, System.Object aValue, System.Object& aResult) [0x00000] in <filename unknown>:0 
      at RAIN.Serialization.FieldSerializer.DeserializeObjectFromElement (RAIN.Serialization.ObjectElement aElement, System.Type aType, System.Object aValue, System.Object& aResult) [0x00000] in <filename unknown>:0 
      at RAIN.Serialization.FieldSerializer.DeserializeObjectFromElement (RAIN.Serialization.ObjectElement aElement, System.Type aType, System.Object aValue, System.Object& aResult) [0x00000] in <filename unknown>:0 
      at RAIN.Serialization.FieldSerializer.DeserializeFieldFromElement (RAIN.Serialization.ObjectElement aParent, System.String aFieldName, System.String[] aOldFieldNames, System.Type aFieldType, System.Object aFieldValue, System.Object& aFieldResult) [0x00000] in <filename unknown>:0 
      at RAIN.Serialization.FieldSerializer.DeserializeClassFromElement (RAIN.Serialization.ObjectElement aParent, System.Object aObject) [0x00000] in <filename unknown>:0 
      at RAIN.Serialization.FieldSerializer.DeserializeReferenceFromElement (Int32 aRefIndex, System.Type aType, System.Object aValue, System.Object& aResult) [0x00000] in <filename unknown>:0 
      at RAIN.Serialization.FieldSerializer.DeserializeObjectFromElement (RAIN.Serialization.ObjectElement aElement, System.Type aType, System.Object aValue, System.Object& aResult) [0x00000] in <filename unknown>:0 
      at RAIN.Serialization.FieldSerializer.DeserializeFieldFromElement (RAIN.Serialization.ObjectElement aParent, System.String aFieldName, System.String[] aOldFieldNames, System.Type aFieldType, System.Object aFieldValue, System.Object& aFieldResult) [0x00000] in <filename unknown>:0 
      at RAIN.Serialization.FieldSerializer.DeserializeClassFromElement (RAIN.Serialization.ObjectElement aParent, System.Object aObject) [0x00000] in <filename unknown>:0 
      at RAIN.Serialization.FieldSerializer.DeserializeReferenceFromElement (Int32 aRefIndex, System.Type aType, System.Object aValue, System.Object& aResult) [0x00000] in <filename unknown>:0 
      at RAIN.Serialization.FieldSerializer.DeserializeObjectFromElement (RAIN.Serialization.ObjectElement aElement, System.Type aType, System.Object aValue, System.Object& aResult) [0x00000] in <filename unknown>:0 
      at RAIN.Serialization.FieldSerializer.DeserializeFieldFromElement (RAIN.Serialization.ObjectElement aParent, System.String aFieldName, System.String[] aOldFieldNames, System.Type aFieldType, System.Object aFieldValue, System.Object& aFieldResult) [0x00000] in <filename unknown>:0 
      at RAIN.Serialization.FieldSerializer.DeserializeClassFromElement (RAIN.Serialization.ObjectElement aParent, System.Object aObject) [0x00000] in <filename unknown>:0 
      at RAIN.Serialization.FieldSerializer.DeserializeRAINObject (System.Object aComponent) [0x00000] in <filename unknown>:0 
      at RAIN.Core.RAINComponent.OnValidate () [0x00000] in <filename unknown>:0 
      at RAIN.Core.AIRig.OnValidate () [0x00000] in <filename unknown>:0 
    (Filename: /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoField.cs Line: 133)

    Any ideas on how to fix this?

    Thanks!

    • This topic was modified 1 year, 6 months ago by  hoodoo.
    • This topic was modified 1 year, 6 months ago by  hoodoo.
    • This topic was modified 1 year, 6 months ago by  hoodoo.
    #33568

    Sigil
    Keymaster

    Are your AI objects on prefabs, or on prefab instances in your scene? There were some issues with our serialization and prefabs where they would get out of sync in some cases, causing this kind of error.

    If this is the case you can generally get rid of the error by reverting each instance back to the prefab. This is no longer an issue in the latest version of RAIN, but the new version doesn’t fix it if it already happening. Sorry about the trouble, let me know if it doesn’t work and we can try to figure it out.

    I’m not sure about the crash, it may be a side effect of this problem though so we’ll have to see if it goes away after these errors are fixed.

    #33811

    hoodoo
    Participant

    Sigil - that fixed it - thank you, after reverting all my enemy characters (yes they were all prefab instances), the errors went away.

    I do notice some odd behavior though running with the new version. I’m using a fairly standard AI where the enemies start to run towards the player when the player comes within range. I have the vision detection set up to be almost 360 and do not require line of sight. With the previous version it was working perfectly, but with the new version if I approach the enemy from behind he starts to turn towards me and then kinds of freezes jostling between 2 angles but still looking 90 degrees to the side instead of directly at me. The enemy stays stuck like this. If I approach from the front view of the enemy then he correctly runs toward me and starts to attack when within range. Any ideas on what’s going on? I will stay with the previous version until I can get this figured out.

    #33829

    Sigil
    Keymaster

    Is it possible that because of the revert that some of the settings on the Motor got reset (maybe a face before move angle or similar)?

    I’ll do some tests over here as well, as there was a fix with the visual sensors, but it had more to do with detecting then moving. Perhaps there is something happening around that 90 degree mark.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.