I think i found the problem.
In Monitored Actor.lvclass:Actor Stopped.vi Delete Variant Attributes are used with out checking for empty strings. When an empty string is passed into Delete Attribute, all Attributes are removed then the code flags that all monitored actors have been closed and closes the Monitor UI.
I think some better bounds checking needs to be implemented here.
Now to find out who is sending a blank Actor ID....
I don't use the substitute actor method in any of my code. No need for it at this point.
I will track down the caller of the Actor Stopped message with Actor ID = 0. I'm sure it was some fault of mine, however, I just wanted to point out that delete attributes with out bounds checking strings can have unexpected results. I've stubbed my toes several times on that same issue usign them for LUT's.
Will you post a screenshot of your pre-launch init?
The only way I can think of for this to happen is if you're not wiring the output of pre-launch init. Any other way that I can think would also break actor framework functionality
I'm also not using Pre-Launch Init.vi in any class of my hierarchy. I got some of the way through tracking down the issues on my end. There are no VIs in the startup or shutdown of an actor that should cause a hang-up.
Thank you for the suggestions on places to look, if you have any other ideas, please let me know. Once I track down the problem or solution I will post a reply.
So the issue of Monitor Actor closing prior to all Monitored Actors exiting was caused by two issues:
1) In a message method, the class output indicator was left unwired (my bad), this caused Actor ID to be dropped.
2) Actor Stopped VI was not filtering out Empty Strings and was clearing all Attributes from the LUT's.
Here is how I fixed the Actor Stopped.vi to help resolve my issues. The new case simply filters on empty strings. If not empty, the Attribute will be removed.
Thanks for the Great Tool, I will continue to use it!
Nice work Derek, I've already discovered a problem I didn't know I had after only an hour or so playing. Extremely useful.
I'm confused about the two versions though you posted though, they're not the same. The updated version in package form no longer has the ability to periodically poll the monitored actors (lower right in the UI). Is that intentional, and is that the version you would recommend using?
I'll live without the polling if that's the recommended version.
Hi, a newb question:
I have two actors, which I have both inheriting from the Monitored Actor. They work fine, but when I stop the main actor with the 'send normal stop', the callee keeps running?
Does introducing this inheritance meen that I have to handle other actores with their own 'send normal stop'?
are you using the "substitute actor" method in your code?
I do and have issues with it. From your question I assume it is known to you as well. Has this topic been expanded somwhere on the forum?