Showing results for 
Search instead for 
Did you mean: 

Open VI is blocking when a menu is opened?

Go to solution



I have recently realized that one of my sub-vi is blocking one of my while loops when any menu is opened: Right click menu, the menu bar, even drop-down controls menus.

And while investigating with the debug function on, it seems that it is Open VI Ref that is blocking.


It would be a bit complicated to share the VIs (dependencies) so here is a simple screenshot (sorry) with further explanation:

  1. The intent is to call asynchronously a timer function (simple loop with the "Elapsed" setting the exit of the loop); This timer is attached below.
  2. The timer fires a User Event with a Queue and a message, The event structure that registers for this event sends the message on the queue and closes the Timer's reference; Specifically in this case, the timer basically calls itself periodically (For an "Update Data" kind of situation)

I thought it could have been a problem of threads: My interface (on which I open "the" menu; and which contains the VI that calls async the timer) is on the UI thread, and the subvi as well as the timer were on "Same as caller" execution thread. But I've changed that to UI, Other1 (sub-vi) and Other2 (Timer) just for the test and same results.



If more information are necessary, or if the actual VIs are necessary, please just ask, I will see what I can do.


Thanks for your help.


0 Kudos
Message 1 of 5
Accepted by topic author VinnyAstro

Hi Vinny,


Here is a minimal example to reproduce your observation:



This weird behavior is documented here:


According to the documentation, you can only avoid that by loading a generic vi ref and by name:



I agree this is weird and a bit frustrating, but at least it is documented…

Maybe you could both report it as a bug and at the same time post it in the idea exchange 😂.




Message 2 of 5

Damn that's weird.


Thanks for your help Raph, I'll try and make some changes then.

I'll see to open new tickets regarding this haha

0 Kudos
Message 3 of 5

See this lovely blog post about the "root loop" for a pretty good explanation and some other details:



0 Kudos
Message 4 of 5

Note that frameworks like Actor Framework and DQMH intentionally leak a single VI reference in order to avoid root loop issues when launching VIs dynamically. Here's a screenshot of the diagram of Launch Actor from AF that describes the approach:



0 Kudos
Message 5 of 5