12-09-2025 09:32 PM
I've got a program based on messenger library that fails to shut down properly. Hoping someone can advise if I'm doing something wrong or if it's potentially a library issue. Attached is some code that reproduces the issue. There's a #info bookmark in there that will show you where you can change code to make the problem behavior go away. But a brief description:
Observations:
I've tried implementing the second bulleted item in my actual program with limited success. For some 3rd level actors (in place of ActorC), loading them dynamically on the front end will solve the problem.....most of the time.... But occasionally it still does fail, which makes me suspect some race condition.
I'm doing this on Windows11, LV2024Q3 32bit
12-19-2025 08:38 AM
Sorry, I didn't see this till recently.
It smells a lot like a variation on Issue#9: drjdpowell / messenger-library — Bitbucket
But it can't be that issue exactly as the setup is different, but the leaving classes locked thing is very similar, so it might be a related bug.
12-20-2025 12:07 AM
Sorting through the trails of threads on the topic is going to take some more effort. Removing the strict type from 'Dynamic Launch Shell ActorNR.vi' reference within 'Get Dynamic Launch Shell Reference ActorNR.vi' does make the problem go away, I just don't quite understand the implications of doing so and/or the exact reasoning behind why the ActorNR version of Get Shell Reference retains the strict type.
For fun, I also tried setting 'Dynamic Launch Shell.vi' reference to strict in 'Get Dynamic Launch Shell.vi'. When doing that, All three of ActorA, ActorB, and ActorC remain locked after shutting down Main.vi, instead of just ActorA and ActorB.
01-01-2026 10:25 PM - edited 01-01-2026 10:33 PM
Coming back to Issue#9 on your bitbucket, let's see if I'm understanding this right....
At the time your issue was logged, there was a bug doing the following:
So my questions/comments are:
I'm working this as support ticket with NI, and they asked whether I could create the issue outside of messenger library. Having not used the native LV Actor Framework before, I dug into that a bit and noticed there was no concept of an non-reentrant actor, and all subactors are launched in essentially the same manner as messenger library re-entrant actors, and the dynamic launch shell uses the non-strict vi ref.
I created NR versions of everything for the native Actor Framework, similar to messenger library, and I was quickly able to reproduce the issue if using the strict type'd vi ref in my 'Launch Actor CoreNR.vi', which leads me back to the same question, why is the NR Dynamic launch shell using a strict ref?
Seems like a LV bug as the actual lockup only occurs if I load the child of a totally unrelated class before I launch my subactor, and the Dynamic launch shell ref is strictly typed.
01-05-2026 07:31 AM
I don't think there is any real problem with you changing that reference to non-strict, and I may do so in the next release of Messenger Library. The only issues this causes are:
1) If you run an non-reentrant actor from the Run Arrow (rather than launching it) it will not be able to launch another non-reentrant actor (will get Error 402824). Originally, one could not launch any actor, but the changes I made in the past, that separates Actor.vi and ActorNR.vi calling, mean that this doesn't happen with reentrant actors.
2) if a non-renetrant actor is broken, its callers will NOT by broken. Instead you will get a run-time error when trying to launch it (which is harder to debug).
These are dubugging annoyances rather than major problems. I think I left the strict reference in for non-reentrant actors just becasue I could, and quite a lot of my day-to-day development involves non-reentrant actors. Having the calling actors break if their callees are broken, rather than throw runtime errors, saves me a lot of time. But the problem you are having is more serious.
01-05-2026 07:37 AM - edited 01-05-2026 07:38 AM
Can you do me a favour? Leave the NR code using a strict ref and instead change the reentrant version to also use a strict reference (in "Get Dynamic Launch Shell Reference.vi"). Does that fix your problem as well?
01-05-2026 11:33 AM
See my second post in the thread. Changing the reentrant to strict made all 3 actors lock instead of just A and B.
01-05-2026 11:37 AM
I'll have to investigate this a little more. I wasn't necessarily seeing the NR failing to launch another NR issue originally, but we just made a code change moving one of the actor launches into a subVI and it created a new issue which is or closely resembles this. My short term fix was simply to remove my top-level VI's class inheritance so it's not a messenger library object. I'll post any more relevant details when I'm back in front of that code.