[BUG] latch behaviour in edge case

Forums 💬 NodeCanvas ⚙️ Support [BUG] latch behaviour in edge case

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #15928
    driiade
    Participant

       

      Hello :),

      I found a bug with the EndAction(null) EndAction(true/false) and the latch feature.

      I think you can repro this, but it’s frame perfect, you need a parallel task :

      And an action which call EndAction from outside of Graph execution. Mine is something like this :

      You can detect and error if you enter/exit a SubFSM you will sometime not Execute Action in the Parallel Node. In fact if you EndAction(true/false) right before and at the same frame than your End(null) you will encounter the problem (?) .

      My solution was to add “latch = false” if we call EndAction(null) after an EndAction(true/false).

      #15935
      Gavalakis
      Keymaster

        Hey 🙂

        Can you please explain the problem a bit more, or maybe show a screenshot so that I can reproduce it?

        Can you also please explain your solution a bit more. latch is already set to false if we call EndAction(null).
        latch = success != null ? true : false;

        Please let me know.
        Thanks!

        #15934
        driiade
        Participant

          Oh yeah the screen shot bugged. This is my solution on screenshot.

          In fact if for some reason you call EndAction(true) -> EndAction(null) during the same “frame” the behaviour will not be the same as EndAction(null) -> EndAction(true).  In the first case, the latch will be called after, and in my situation the action will be skipped (because of the latch) for the next time I call it.

          In my case I was executing action in parallel on a subFSM and stopping them outside of NodeCanvas (in a callback), and the behaviour was all wrong with entering/exiting the subFSM.

          #15933
          Gavalakis
          Keymaster

            Thank you for the follow up and explanation. This is a super edge case for sure 🙂
            I don’t see any problems with the code change you’ve made really, but I will have to test further to be sure before adding it officially. Is everything else working as expected and as it were for you after making this change?

            Thanks!

            #15932
            driiade
            Participant

              Hi.

              No problem with this change so far.

              #15931
              driiade
              Participant

                Hello, come for some update as we will use NodeCanvas in a new Big project.
                Did you come to include this for futur version ?

                #15930
                Gavalakis
                Keymaster

                  Hey,

                  In the latest live version I commented this line because I wanted to first make sure it does not create any problems. Until then, please comment out the line on your local version when you update.

                  Thank you!

                  #15929
                  roger_peng
                  Participant

                    I encounter the same problem when using behaviourtree.

                    My solution is always calling EndAction(true/false) inside OnExecute or OnUpdate Function when make a custom action task.

                    driiade’s solution is better, but please make a update or a document about this issue.

                     

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