Error when sending notifications in child actor cleanup

Issue #67 resolved
Ross Smyth created an issue

Hello,

I have a setup where one actor launches another actor and the parent subscribes to some messages. When the child actor shuts down, during cleanup it sends a state notification, and the parent receives it. But it seems that the child shuts down while the parent is still processing the message.

Steps:

  1. Call Actor.lvclass:Shutdown.vi on the child from the parent (doesn’t matter if wait for exit is true or false)
  2. In cleanup code update a state notification message with an empty data array for any other actors that may be observing
  3. Child actor exits
  4. Parent actor begins processing the state notification
  5. Error occurs in parent

I have a hack to make it work by putting a 50 ms wait in a sequence structure before the child event messenger is destroyed. The error that occurs is shown below.

This works fine for me as shutdown timing doesn’t matter. But I thought that it would be useful to know.

Comments (2)

  1. James Powell repo owner

    Can you elaborate? The error seems to indicates you are trying to send a message to the Address of the Child actor that you just shut down. This seems a perfectly reasonable error. Why is your handling of a Notification causing a send of a message to the (now dead) Child?

  2. Log in to comment