[Bug] Version 2.7.0 silently breaks BT written in Version 2.6.4

Forums 💬 NodeCanvas ⚙️ Support [Bug] Version 2.7.0 silently breaks BT written in Version 2.6.4

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #17589
    timv
    Participant

      I found an issue with Version 2.7.0 with the “Set Property (mp)” ActionTask. Please load the attached scene. I created it in Unity 2017.2.0f3, using NodeCanvas 2.6.4. It’s the simplest example I could make of this error.
      The BT should disable the CircleCollider2D when it is run. It works correctly in Version 2.6.4. However, when loading and running the Scene in version 2.7.0, the “Type” argument of the “Set Property (mp)” ActionTask changes from “CircleCollider2D” to “Behavior” and it disables the Behavior component instead.
      If you just open scene and the BT (embedded on the camera object), and click on the action node, and then save, it will also change the task to disable the Behavior instead of the CircleCollider2D.

      #17596
      timv
      Participant

        Uhm, I tried uploading the scene, but I failed. It says “File types allowed for upload: .jpg, .jpeg, .jpe, .png, .gif, .rar, .zip…”, but after posting I get the error “NodeCanvasTest.zip: Sorry, this file type is not permitted for security reasons.”. So zip is not allowed even though it says so on the website itself?

        #17595
        timv
        Participant

          Trying again as unitypackage.

          #17594
          Gavalakis
          Keymaster

            Hello,

            Thanks for the report. I have attached for you here a unitypackage fix to the issue.
            Regarding the upload files restriction, there is currently a technical problem with the forums which I am trying to solve.

            Please let me know if everything works correctly for you after the fix package import.
            Thank you.

            #17593
            timv
            Participant

              Hi,

              Thanks for your message. I have tried your package and it does solve this issue. However, there is another issue with the same ActionTask. Try running the attached scene in NodeCanvas version 2.7.0. The BT only tries to set property sharedMaterial on the CircleCollider2D. However, version 2.7.0 encounters problems when passing the argument to the set property method.

              Version 2.6.4 shows this info on the node:
              owner.set_sharedMaterial = NULL
              and this when viewing the details of the action task:
              Set Type PhysicsMaterial2D

              Version 2.7.0 shows this info instead:
              owner.set_sharedMaterial = System.Object
              and this when viewing the details of the action task:
              Set Type Object

              When running the scene I get the following exception:
              ArgumentException: failed to convert parameters
              System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:192)
              System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
              NodeCanvas.Tasks.Actions.SetProperty_Multiplatform.OnExecute () (at Assets/ParadoxNotion/NodeCanvas/Tasks/Actions/ScriptControl/Multiplatform/SetProperty_Multiplatform.cs:63)
              NodeCanvas.Framework.ActionTask.ExecuteAction (UnityEngine.Component agent, IBlackboard blackboard) (at Assets/ParadoxNotion/FlowCanvas/Framework/Runtime/Tasks/ActionTask.cs:119)
              NodeCanvas.BehaviourTrees.ActionNode.OnExecute (UnityEngine.Component agent, IBlackboard blackboard) (at Assets/ParadoxNotion/NodeCanvas/Modules/BehaviourTrees/Nodes/Leafs/ActionNode.cs:38)
              NodeCanvas.Framework.Node.Execute (UnityEngine.Component agent, IBlackboard blackboard) (at Assets/ParadoxNotion/FlowCanvas/Framework/Runtime/Graphs/Node.cs:282)
              NodeCanvas.BehaviourTrees.BehaviourTree.Tick (UnityEngine.Component agent, IBlackboard blackboard) (at Assets/ParadoxNotion/NodeCanvas/Modules/BehaviourTrees/BehaviourTree.cs:98)
              NodeCanvas.BehaviourTrees.BehaviourTree.OnGraphUpdate () (at Assets/ParadoxNotion/NodeCanvas/Modules/BehaviourTrees/BehaviourTree.cs:81)
              NodeCanvas.Framework.Graph.UpdateGraph () (at Assets/ParadoxNotion/FlowCanvas/Framework/Runtime/Graphs/Graph.cs:658)
              NodeCanvas.Framework.Graph.StartGraph (UnityEngine.Component agent, IBlackboard blackboard, Boolean autoUpdate, System.Action`1 callback) (at Assets/ParadoxNotion/FlowCanvas/Framework/Runtime/Graphs/Graph.cs:604)
              NodeCanvas.Framework.GraphOwner.StartBehaviour () (at Assets/ParadoxNotion/FlowCanvas/Framework/Runtime/Graphs/GraphOwner.cs:99)
              NodeCanvas.Framework.GraphOwner.Start () (at Assets/ParadoxNotion/FlowCanvas/Framework/Runtime/Graphs/GraphOwner.cs:196)

              #17592
              Gavalakis
              Keymaster

                Hello,

                Thanks once again for the bug report. That was a nice find which occurs in cases where the value of the parameter is nullable and the parameter value is set/left to null, thus was hard to find.
                To fix this, please open up fsBBParameterProcessor.cs file and change line number #26, to be like this:

                Thank you!

                #17591
                timv
                Participant

                  Hi,

                  Thanks for the additional fix. For me, the if-statement was on line #28. Did you make any additional changes to this file that are not in the 2.7.0 release? So far, it seems to be working, but I’d like to run some more tests.

                  Will you be making these exact changes for the next official release as well?

                  Thanks,
                  Tim

                  #17590
                  Gavalakis
                  Keymaster

                    Hello again Tim,

                    The difference in the line number is OK (I just made some cleanup in the comments).
                    Yes, these exact same changes will be there in the next version of course 🙂

                    Thanks again for help in finding those problems.

                  Viewing 8 posts - 1 through 8 (of 8 total)
                  • You must be logged in to reply to this topic.