Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Actor.vi not stopping

Hello again friends,

Can somebody tell me what would make the Actor.vi fail to finish. I have 8 I/O actors, 4 of which are different versions of the same class. One of the actors will not shut down and causes the whole project to hang locked. Using DETT I can see that this actor's Stop Core is called and returns, the Actor Core is called and returns, but the Actor.vi never returns. I must use the Task Manager to shut down all of LabView. The message when I try to close the project is that some Actor Proxy is still running.

I don't understand how the Actor can fail to shutdown if the Stop Core succeeds. The only thing I can see that may cause it is an infinite supply of DO messages left over. This is not the case, the Drop Message Core finishes successfully. What am I missinng? I've been chasing this for over a week now & cannot even figure out where to look.

Possibly related is another problem: I can run the program in the Dev Environment but when I try to run the .exe it crashes quickly. Same program runs OK in project (except the hanging error) but won't run properly in .exe. Even on my developer PC.

Of course, project is due & product is shipping...in hours. Thanks for any help.

JB

0 Kudos
Message 1 of 9
(6,256 Views)

Do you have a parallel loop in your Actor Core that is not being stopped by the Stop Core?

0 Kudos
Message 2 of 9
(4,397 Views)

At first I would say no, but then I remembered the Time-Delayed Send Message. I send update PV messages and % Output messages with it & I'm not 100% sure I'm stopping the thing. Any time I call another T-D Send Message, I destroy the old notifier & then store the new one in its place. At the end I destroy both the % Output & PV notifiers which should stop the Delayed Message loop right?

Originally, I was using the T-D Sender to send one message and stop. I know I was destroying the notifier before calling another one but it still slowed my program down to a crawl. Not sure what's happening but I must not be killing the thing by destroying the notifier. What can I do?

I could just run a parallel loop in the Actor Core but the T-D Sender is much more flexible. I would use it more if I knew how to kill it properly. Do I need a wooden stake? Maybe a silver bullet? Garlic?

0 Kudos
Message 3 of 9
(4,397 Views)

Can you post your code or a simplified example?

0 Kudos
Message 4 of 9
(4,397 Views)

A) Don't just destroy the Notifier... send the notifier one of the stop values (cancel and don't send any further messages). Does that fix the issue?

B) Put an FP.Open method call on all of your Actor Core VIs. That way when you stop, you can see which one is still running. Do we learn anything from that?

C) Yes, a wooden stake helps.

0 Kudos
Message 5 of 9
(4,397 Views)

Thanks AQ, great ideas. Unfortunately, none worked. All of my actor FPs close yet there is one ACBRProxy actor that will not stop. It hangs the application every time. I cannot figure out why it would keep running if all the actors stopped properly.

Thinking it had something to do with the discussion on opening references to actor.vi, I re-worked the Launch Actor.vi to mirror your LV 2013 prototype. That didn't help.

0 Kudos
Message 6 of 9
(4,397 Views)

Can you post a picture of your VI Hierarchy Window when you're in the hung state? I might be able to tell you more that way.

0 Kudos
Message 7 of 9
(4,397 Views)

Did you ever resolve this problem?

0 Kudos
Message 8 of 9
(4,397 Views)

No AQ, I never did resolve this and spent some months away from software development. It only happens on a built executable so I don't know how to take a picture of the hierarchy.

Let me take some time to look over all the AF posts since May and see if I can come up with some ideas (wow, AF explosion after NI week!). I will re-post once I have more information, thank you for following-up.

0 Kudos
Message 9 of 9
(4,397 Views)