From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

actors still running after stop core done

Solved!
Go to solution

Hi,

I have a the following hierarchy:

Controller actor launches 3 sub actors: A B and C.

Controller also loads and runs plugins of type X and Y.

If I have a "junk" plugin of type X, the controller loads it, runs it, stops it and exits properly.

If I have a plugin of type X called myX that actually does something, the controller loads it, runs it, stops it and doesn't exit properly. The actor core of all the nested actors ends (I have verified this by having them write a message after the call parent node in actor core and where relevant also after exiting the GUI event structure). All actor cores finish running. But they don't stop. They just stay in running mode (light arrow, not bold arrow). Closing the project has the"closing this project will abort some running VIs" message, after which the "resetting VI" window appears until labview is killed from task manager.

Opening and running the plugin from a different actor in a different project runs with no problems.

So my questions are:

1. What could be running, if the plugin exits properly (run button is white, not running) and all the actor cores finish executing?

2. Why does it only happen with this plugin?

Any help would be appreciated

Danielle

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
0 Kudos
Message 1 of 27
(10,544 Views)

Danielle,

what kind of messages are you using to stop the actors? Stop Meessage defined in the AF others?

Oli

Message 2 of 27
(5,271 Views)

Danielle,

few other thoughts:

- are you really sure, your Actor Cores have stopped executing? Have you used the Monitored Actor for debugging? I really love it to see what's actually running.

- are you using Abstract Messaging?  If yes, are you sure you are sending the same object type as in the program that's working? I've seen unexpected behaviour sending "a slightly wrong" message type

Message 3 of 27
(5,271 Views)

Oli, thanks for your answers.

- I'm using the Stop message defined in AF to stop the actors. I tried assuming that nested actors stop automatically and also sending a stop message to all nested actors, no difference.

- I'm using my Debug Console for debugging, it's an actor that receives messages from other actors and logs them. I have my actors send a message to the debug console after call parent done and after GUI structure ended, all actors send the message correctly. In addition, I actually opened every running FP (using scripting on VIs in memory), the arrows are not in "actively running" mode in the actor cores.

- I'm not using abstract messaging, I'm using loosely coupled actors. all the actors except the debug actor are children of the same parent actor.

Any help would be appreciated!

Danielle

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
0 Kudos
Message 4 of 27
(5,271 Views)

Hi all,

Because the "Junk" plugin didn't cause any problems, I started erasing stuff from myX plugin and seeing if I can isolate the cause of the problem. The problem appeared to be in the event loop of the myX plugin, in one event called "send" that attempts to send data to hardware via TCP/IP connection. Removing the content of this event solved the problem. Rewriting the contents of this event (not reverting)  did not cause the problem to return. Reverting using source control did cause the problem to return.

Maybe the VI got corrupt?

Any ideas would be great, because I really don't want this to happen again...

Thanks,

Danielle

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
0 Kudos
Message 5 of 27
(5,271 Views)

It gets wierder. Closing and opening the porject and running again, showed the problem still existed. Opening the project and running the launcher VI from a different project via scripting had no problem at all.

Is this some sort of bug in LV2014, with actor framework and PPL plugins?

Please help,

Danielle

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
0 Kudos
Message 6 of 27
(5,271 Views)

Hi Danielle,

This reminded me of an issue I had with asynchronous call, I had several modules that were launched the same way and only  one of them would seem to keep running (run arrow was not white, but it wasn't actively running either). I believe the AF uses asynchronous call and this could be the issue.

Here is a thread in LAVAG that talks about this issue:

https://lavag.org/topic/16708-cant-programatically-abort-or-find-asynchronous-call-0x80/?p=112990

Also, someone pointed out that probably the LabVIEW 2014 f2 patch might help:

https://decibel.ni.com/content/message/91608#91608

Regards,

Fab

For an opportunity to learn from experienced developers / entrepeneurs (Steve, Joerg, and Brian amongst them):
Check out DSH Pragmatic Software Development Workshop!

DQMH Lead Architect * DQMH Trusted Advisor * Certified LabVIEW Architect * Certified LabVIEW Embedded Developer * Certified Professional Instructor * LabVIEW Champion * Code Janitor

Have you been nice to future you?
Message 7 of 27
(5,271 Views)

Thanks for the links Fab, it gave me some hope that I wasn't going insane

I haven't installed the patch yet, but the lavag post gave me an idea and I found that if I employ a "verified stop", i.e. have my controller close the plugin, get last ack, and only then stop itself, it does exit properly (at least until I change something else )

Thank you so much all of you for your help!

Danielle

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
0 Kudos
Message 8 of 27
(5,271 Views)

I'm about to look into a career as a gardener.

the f2 patch does not affect this problem.

The f2 patch and switching to LV64 bit (because in the 32 bit LV my actor framework lvlib got corrupt) worked the first time, but after closing and opening the project I got the same problem.

Using a verified stop works sometimes. I couldn't find a pattern.

I don't always get the last ack from nested actors, could this also be part of the problem? I created my own last ack message and I get that with no problem.

Please help.

Thanks,

Danielle

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
0 Kudos
Message 9 of 27
(5,271 Views)

I have found that when using dynamic events with an event structure, and if those references are not released, it holds the VI in memory as locked. Not running but the class is still locked. This was in 2013 and 2014 pre SP1.

Not sure if this will apply to you.

Brian G. Shea
Certified LabVIEW Architect
0 Kudos
Message 10 of 27
(5,271 Views)