Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Is Handle Error only used for message processing errors?

I'm trying to decipher from your problem description what might be going on.  Hard to say without seeing 1) Your Handle Error.vi override in the root actor (that is not stopping), and 2) the Actor Core of this actor.  If you could post these we could probably figure it out pretty quickly.  With that said, I would say a couple things based on what you are describing.  First, your Handle Error.vi override decides what happen when a message handler method of the actor produces an error.  The framework (Actor.class:Actor core.vi) calls Handle Error in the message handler loop when VIs in your actor return errors.  By "deciding", that means what do you output to the "stop actor?" output of your Handle Error.vi override?  And also did you call the parent Handle Error.vi or not?  And if not, are you handling the "native stop" error code 43 (you need to replace the parent's functionality if you don't call it yourself).  If you output True for "stop actor?", the message loop will shutdown.  If you don't override Handle Error, then the parent VI will always output True and any error will shutdown the actor.  But you are right, "shutting down" the parent Actor Core doesn't necessarily shutdown your actor- it just completes the parent's Actor Core node that was called in your Actor Core override.  If your Actor Core doesn't itself then complete, this could be the problem (do you have an Event Loop running, etc?).

Another thing (and maybe a completely separate issue) is that you said the nested actors don't shut down.  IF the parent Actor Core.vi stops, then the nested actors WILL shutdown (or at least they will receive Stop messages) regardless of what is going on in your root actor.  That is, if you launched the nested actors properly and stored their queues in the root actor wire before launching the root parent Actor Core.vi (another reason to want to see what you did in your Actor Core).  It sounds like you could set a few breakpoints (in your Handler Error.vi, your Actor Core.vi) and step through during your various error scenarios to figure out who/what is at fault.

0 Kudos
Message 11 of 13
(930 Views)

Well, this is not the first time I've had issues only to try the next day and things work as expected. I'm not sure what's going on. I do have the odd LabVIEW crash (and I mean with no warning or error) when editing VIs so perhaps this is just a symptom of something else going on. My lab computer seems to run fine, but I do most of my development on my company asset where I'm apparently having issues.

Sorry for the bother.

0 Kudos
Message 12 of 13
(930 Views)

No need to apologize, especially if there's a LV crash. There are only two nodes that can legitimately cause LV to crash: Type Cast and Call Library Node. Those two allow users to do abusive things to LV's memory system that may bring down LabVIEW in ways we cannot detect. Anything else is a mistake on our part. If the crash happens regularly, please contact an AE so maybe we can fix it for you. The AEs will do their best to characterize the crash and escalate it to R&D as necessary. At the very least, please do hit Send when asked to send info about the crash to NI. Every crash log, even repeated from the same user, can help us track down the hard-to-reproduce bugs. We've fixed several hundred of those over the last 5 years thanks to users sending in the crash logs.

0 Kudos
Message 13 of 13
(930 Views)