Bug: OnStop() called on interrupted task after executing interupting task

NodeCanvas Forums General Discussion Bug: OnStop() called on interrupted task after executing interupting task

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #14037
    handsomegeoff
    Participant

    Hi There,

    I utilize the OnStop() method in ActionTasks to clean-up an agents state within the ActionTask before moving into another state. I’ve ran into a problem though using the dynamic selector. It seems that when a higher priority state is activated, its first ActionTask is executed before OnStop() is called in the interrupted ActionTask. Please see the screen grab. Branch 1 runs and “Produce for 60 seconds” is executed. It gets interrupted by branch 2 before it is done processing. I would have expected OnStop() to be called in “Produce for 60 seconds” before the first ActionTask is executed in branch 2 ($owner.ReleaseTaskProvider()), but the opposite happens. $owner.ReleaseTaskProvider() is executed, then OnStop() is called on “Produce for 60 seconds”. I think, conceptually, an ActionTask should be an atomic operation and should complete its lifecycle before another is executed. Can you confirm if this is a bug, or is expected behaviour.

    Thanks for your time and attention on this.
    Geoff

    Attachments:
    You must be logged in to view attached files.
    #14041
    handsomegeoff
    Participant

    Sorry, I realize I posted this in the wrong forum. I’ve reposted in support.

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