I have been working on some pretty large applications lately that have highly dynamic behavior. Actors are getting launched and closed, views are frequently popping into subpanels--that kind of thing. At some point pretty far into my development, I started getting this dialog when my executable (EXE) shut down. It seemed harmless enough, until I realized it was not going away...ever.
I did the usual web snooping and stumbled on this LAVA post. Infinite Reset of Death sounds about right (IRoD, as I now call it).
In my first act of attempted remediation, I somewhat arbitrarily added explicit (actually redundant) shutdown to my framework. I don't like the idea of adding code just to see what happens, but I thought that I might avoid the problem by enforcing a more orderly shutdown process. Nope.
When that failed, I tried mass compiling and rebuilding. I pretty quickly learned something about a river in Egypt and that this problem is also intermittent. It tended to happen sometimes rarely...then constantly (and, of course, most often on the customer's embedded PC).
Done Messing Around
This problem is a strange type of nuisance. When it occurs, I've already done everything I can reasonably do to shut down my application. To be clear, this is not a case of an Actor left silently running. Everything is stopped--I'm sure of it--and LabVIEW is fighting with itself to release resources.
I spent a while pondering the safety implications and general dirtiness of the following solution. It was the best I could muster--and I think it is absolutely harmless, since all my code is completely done executing (hardware set to safe states, data saved, and resources obtained by LabVIEW closed).
The idea is super simple--kill the specified task through Windows command prompt. (Only works on Windows, of course.)
Call Collect Application.vi when you are ready to reap. You will, of course, want to call this after all of your code is done running. (The same place you might have called the Quit LabVIEW function)
Which runs a pre-built LabVIEW EXE that calls a Windows batch file:
You see this while reaper works:
...And that's the end of your application. No doubt about it. If you go this route, you'll need to build a reaper in whichever version of LabVIEW run-time you are deploying. You must also include the EXE and its batch file in your buildspec but, if you read this far and understood what I was talking about, you probably already knew that.
Ethan Stern is a Managing Partner at Composed Systems and is a Certified LabVIEW Architect, Certified LabVIEW Embedded Developer, NI Certified Professional Instructor, and SOLID software enthusiast.