Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Libraries Locked - Possibly connected to the Send-Delayed Time Message still being in use

Solved!
Go to solution

Hi everyone,

 

I have a question regarding the workings of Actor Framework, especially since i seem to have managed to trigger some strange behaviour while implementing it.

 

I am using LV2012 SP1 for this one and unfortunately cannot upgrade the LabVIEW Version for this Project.

 

So i am calling multiple instance of an Actor in this Example (See attached Code below). I override the Pre Launch Init VI and send a connect message to the particular instance of the Actor.

 

Pre Launch Init.PNG

 

The Actor goes on to enter the Actor Core.VI and executes the Message "Connect" which looks like this:

 

Connect.PNG 

 

So far so good. The Connect.VI goes on to trigger a Time Delayed Message which runs until the actor stops. Now the interesting part - If I introduce a delay into the Connect.VI , let's say a delay of 2 Seconds (look at the above picture for reference) and I run the Code and then stop it - the Libraries in my Project will become locked.

 

Libraries Locked.PNG

 

If I do not introduce the Delay, the libraries don't lock. Any Idea why this might be happening?

 

One more clue - I tried tracking down which VI stays open and it seems that the "Time-Delayed send Message Core.VI" is somehow still in use:

 

Time Delayed Send Msg.PNG

 

I really don't want to introduce this Bug into a Code a deploy at the customer. Any Ideas about what is happening here would be greatly appreciated.

 

Siegmund

0 Kudos
Message 1 of 8
(4,046 Views)

If your libraries are locked and you close the project, does this dialogue box appear stating there are still some modules running?

0 Kudos
Message 2 of 8
(4,014 Views)

 


@Oli_Wachno wrote:

If your libraries are locked and you close the project, does this dialogue box appear stating there are still some modules running?


Hi Oli,

 

thank you for your reply. No dialog box appears. I also tried making an Executable  and stopping it and it works normally. After stopping it, there is also no more task in the Windows Task Manager. 

 

So it does appear to be stopping, it just locks the Libraries for some reason.

0 Kudos
Message 3 of 8
(4,012 Views)
Solution
Accepted by topic author Siegmund

So the actor seems to shut down...

 

Unfortunately I can only go back as far as LV2013, yet a link which drjdpowell posted some time ago came to my mind:

Quick Tip: Asynchronously launching VIs the right way

 

Looking at the 2013 implementation, it seems it is done the wrong way there. But I have no clue, why this should happen only with longer delays..

Message 4 of 8
(4,010 Views)

Are you notifying the timed message to stop in stop override?

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral
0 Kudos
Message 5 of 8
(4,005 Views)

If I'm getting it right, the Time-Delayed Send Message Core.vi should stop at latest when  the Actors Enqueuer get's invalid/ Actor stops.

After trying to send the next time-delayed message to the shutdown Actor, all VIs should stop executing. And libraries should be unlocked

 

Yet maybe I'm missing something here

0 Kudos
Message 6 of 8
(4,001 Views)

@Oli_Wachno wrote:

So the actor seems to shut down...

 

Unfortunately I can only go back as far as LV2013, yet a link which drjdpowell posted some time ago came to my mind:

Quick Tip: Asynchronously launching VIs the right way

 

Looking at the 2013 implementation, it seems it is done the wrong way there. But I have no clue, why this should happen only with longer delays..


 

Hi Oli,

 

that did the trick! No more weird behaviour. I will have to test it thoroughly, but at least for now, all seems well. Thank you for your help, you saved me from some future anxiety there 🙂

 

 

 

@Taggart wrote:

Are you notifying the timed message to stop in stop override?



As Oli wrote, in this particular Example i posted, the timed message stops on it's own, once the "Actors Enqueuer get's invalid".

 

0 Kudos
Message 7 of 8
(3,989 Views)

yes I forgot that it did that.   I guess when I took the class Allen just beat it into to my head to always clean things up in StopCore.  In this case it's not necessary.

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral
0 Kudos
Message 8 of 8
(3,976 Views)