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:
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.
Solved! Go to Solution.
Here is a minimal example to reproduce your observation:
This weird behavior is documented here: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000001Dd6ISAS&l=en-US
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 😂.
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
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 Core.vi from AF that describes the approach: