01-10-2018 07:43 PM
Hi all,
Using the teststand API I'm occasionally getting the dialog: "some executions were not released the last time the teststand engine was destroyed" when I start up my application.
For the most part I'm cleaning up everything correctly, and it doesn't come up very often, but sometimes it does. So I have two questions:
Thanks
01-11-2018 02:41 AM
Hi smithed, sounds like you have just missed closing at least one API reference. I guess it only happens occasionally for you as determined by if the code happens to branch into the section that doesn't close the reference. I have never thought about blocking the dialog (not sure it is possible or a good idea), I have always searched for the missing Close Reference and added it.
Steve
01-11-2018 11:56 AM
I think it mostly happens if I get into a hang and have to abort the program (or when lv crashes), but the cause is really besides the point. If I'm leaving a reference open, why is it telling me when I restart the program? What am I supposed to do about it then?
And more importantly, why is it a modal dialog telling my operator something that I don't even care about 😛
The reason I ask is there seems to be a way to suppress most dialogs and replace with programmatic behavior, like callbacks for when an execution is still running and you try to shut down an engine, or station options for what to do. I'm trying to suppress all of the built-in dialogs and replace with software-defined responses, but this is one without a clear parameter or callback, so far as I can find.
01-12-2018 04:33 PM
Leaving references open could lead to a memory growth issue and subsequent crash.
What specific dialog boxes are you trying to suppress?
01-13-2018 01:09 AM - edited 01-13-2018 01:18 AM
@even-And wrote:
Leaving references open could lead to a memory growth issue and subsequent crash.
Sure -- and knowing that at the end of execution (ie what the more informative reference leak dialog does), or in the form of a warning or a log message, potentially very useful.
However once the memory is leaked, the damage is done. From what I can tell (and what I was hoping to be corrected on) is that essentially teststand is providing a modal dialog saying, "before you continue, you must acknowledge that last time you ran teststand you were naughty and didn't shut down properly, but we won't tell you anything else about what you did wrong".. I don't find it particularly useful to be scolded by software 😛
Now, if there is some action I can take, like programmatically resetting the teststand process in some way to clear out any leaks and give myself a fresh state...well that would be great. But I'm not sure how, or if its safe, to do so.
Edit: looks like this guy wanted to do the same thing, but the thread trailed off without a solution: https://forums.ni.com/t5/NI-TestStand/Some-question-about-programatically-resetting-an-engine/m-p/17...
even-And wrote:What specific dialog boxes are you trying to suppress?
This one:
@smithed wrote:
Using the teststand API I'm occasionally getting the dialog: "some executions were not released the last time the teststand engine was destroyed" when I start up my application.
Its a one-button modal dialog (ie it just has "OK") and it appears to be generated when I call appmgr start.
01-15-2018 09:45 AM
If the message you are seeing is the one I'm thinking about, you can disable it in Configure>>Station Options>>Preferences>>Debug Options>>Report Object Leaks.
The message is basically saying "FYI: You have a bug in your code that you might want to find and fix."
01-16-2018 12:42 PM
Thanks. The description in the dialog sounds like it is specific to the shutdown leak dialog, but I haven't seen that one for a while so I've disabled it and will see if it works -- now just to reproduce the problem again 🙂
01-17-2018 08:42 PM
I got the popup again today, not clear why. I have a fairly sequential test for my application that I always follow (load sequence, create execution, start run, single-step, poll, single-step, poll..etc... then shutdown). Out of say 10 runs today, 1 resulted in the dialog. I've reenabled the shutdown-leak-warning in hopes that I can figure out what the problem is, but...
On the subject of avoiding the dialog entirely, is it safe to completely reset the NI Teststand service? (or is that not where the engine 'lives'?)