FSM state transitions and script function access results in GC alloc.

Forums 💬 NodeCanvas ⚙️ Support FSM state transitions and script function access results in GC alloc.

  • This topic has 0 replies, 2 voices, and was last updated 11 years ago by Gavalakis.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #18998
    peksi
    Participant

      The FSM is producing garbage with each transition, easiest way to reproduce is have two empty action states loop into each other with OnFinish condition. Of course, setting up like that makes no sense at all. I did add conditions, but the conditions change very often and I can see some garbage. Behaviour Tree with same end result doesn’t produce any garbage. So is this a bug, user error or a “feature”? I’d say it is a bug, as frontpage slider advertises zero GC.

      Also Script Control -> Standalone only -> Execute Function & Check Function in FSM produce garbage. Check Function in BTree also produces garbage, but Execute Function doesn’t. I made sure the called functions are simple as possible so they themselves don’t go creating garbage.

      Script access garbage can be circumvented with coding custom tasks and conditions for each case, but that sort of defeats the purpose of nodecanvas a bit. FSM state transition garbage I cannot circumvent at all, so that I consider biggest problem.

      #19002
      Gavalakis
      Keymaster

        Hello,

        Thanks for the notice. I got rid of the garbage of FSM transitions. It was due to 2 foreach calls.
        I can post here the exact changes if you like.

        I will take a closer look at CheckFunction as well tomorrow and post back for you here.

        Thanks!

        #19001
        peksi
        Participant

          Nice. Yes, please do post changes so I can confirm it is settled 🙂

          #19000
          Gavalakis
          Keymaster

            Sure 🙂
            Here are the changes:

            FSM.cs line #115-116 replace with:

            ActionList.cs line #119 (OnStop Method) replace with:

            I will also take a look at CheckCondition a bit later 🙂

            Let me know.
            Thanks!

            #18999
            peksi
            Participant

              Yes, looks like it is working better now. Good stuff. If I find more GC alloc I’ll be posting them here.

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