LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
_carl

Add ability to open/abort running VIs from "Abort Running VIs" popup.

Status: New

LabVIEW 2021 now has this pop-up, which lets you know if you still have VIs running in the background when you try to close a project: 

_carl_0-1655215157557.png

Great!  Because previously you were alerted that some VIs were still running, but not which ones. So this helps substantially with debugging.

 

However, I usually just want to abort these VIs without closing my project. There's still no (obvious) way to either open or abort these still-running VIs. That leaves me twiddling my thumbs (often for several minutes on large projects) while I close and re-open the project.

 

The request: Add the ability to either open or abort these running VIs from this window.  It could be as simple as adding an "Abort All" button...or even adding documentation on how these could be closed:

_carl_1-1655216075971.png

 

(And yes, obviously the correct solution here is for me as the developer to fix the bug that's leaving these VIs running... however, in the real world, sometimes this is either lower priority than other issues, or falls onto someone else's plate...and in the meantime you're left regularly waiting for your project to reload.)

7 Comments
wiebe@CARYA
Knight of NI

@_carl wrote:

(And yes, obviously the correct solution here is for me as the developer to fix the bug that's leaving these VIs running... 


I haven't tried this new dialog, but wouldn't it (also) be useful to actually open these VIs?

 

That would help to check why they are still running.

_carl
Member
I haven't tried this new dialog, but wouldn't it (also) be useful to actually open these VIs?

Yep, absolutely. (But 90% of my usual headache is just not being able to stop these easily.)

Petru_Tarabuta
Member

+1. It would be nice if there was a way to abort one/multiple/all running VIs.

 

I've been using a VI named "Emergency Abort.vi" for this purpose. It aborts all running VIs, and is implemented as seen below.

1.png

The "False" case of both case structures contain no code, they just pass the wires through.

 

You may want to tick the "Run when opened" setting. This is useful when a modal window hangs. When this happens you can't double-click the VI in the project, but you can still double-click it in File Explorer.

2.png

 

The VI is based on the similarly-named VI shown in the LabVIEW for Everyone, Third Edition book.

 

Hope it helps.

 

Regards,

Petru

_carl
Member
I've been using a VI named "Emergency Abort.vi" for this purpose. It aborts all running VIs, and is implemented as seen below

Thanks for the suggestion!  However I've come across this tool before (and please correct me if I'm wrong), but I don't believe this finds and aborts reentrant clones (which is really what I need it for).

 

I also feel that this is functionality that would be better implemented directly in LabVIEW, rather than having users rely on external tools.

Petru_Tarabuta
Member

"However I've come across this tool before (and please correct me if I'm wrong), but I don't believe this finds and aborts reentrant clones (which is really what I need it for)." - I never tried using it for aborting reentrant clones, so unfortunately I can't say whether it works in that case.

 

"I also feel that this is functionality that would be better implemented directly in LabVIEW, rather than having users rely on external tools." - I agree.

wiebe@CARYA
Knight of NI

>I've been using a VI named "Emergency Abort.vi" for this purpose. It aborts all running VIs, and is implemented as seen below.

 

Sadly, that doesn't stop all running VIs.

 

Top level running clones aren't returned by All VIs in Memory.

 

So, for each VI, you have to check if it's a reentrant VI, if so calculate it's 'magic' hash, in a for loop for an unknown number of iterations stop them (because there's no way to know how many clones are in memory). 

avogadro5
Member

+1, and one very valid use case is to debug whatever is causing VIs to be left running!

And one more external tool is LabVIEW Task Manager, which is great at finding clones across your projects but not so great at correctly distinguishing between running and reserved VIs.