Error when sending notifications in child actor cleanup
Issue #67
resolved
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:
- Call Actor.lvclass:Shutdown.vi on the child from the parent (doesn’t matter if wait for exit is true or false)
- In cleanup code update a state notification message with an empty data array for any other actors that may be observing
- Child actor exits
- Parent actor begins processing the state notification
- 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)
-
repo owner -
reporter - changed status to resolved
I'm dumb
- Log in to comment
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?