01-08-2025 08:31 AM
@Yamaeda wrote:
wiebe@CARYA wrote:
@Drouilhet wrote:
I believe that to release all the resources associated with the VI that I am removing from the subpanel, I need to close the reference to it. However, if I close the reference, I get error 1307 when I try to insert the incoming VI in the subpanel.
Of course, it would be convenient to get the subpanel reference from the VI reference, but it has been decided that that's a horrible idea.
You can get the VI ref from the Subpanel, i just learned ...
Be very careful with that property!
If the VI in the subpanel is a clone, that property will return a reference that will corrupt both the subpanel and the clone VI if you close the reference, and it will leak if you don't.
All kind of weirdness will happen (the Vi will stay in the panel, even if the owner of the subpanel stops, the Vi will be locked, etc). You'll have to restart LabVIEW (and fix the code).
This might be fixed in very recent versions (>20), but NI never acknowledged the problem so I doubt it.
01-08-2025 08:58 AM
wiebe@CARYA wrote:
@Yamaeda wrote:
You can get the VI ref from the Subpanel, i just learned ...
Be very careful with that property!
If the VI in the subpanel is a clone, that property will return a reference that will corrupt both the subpanel and the clone VI if you close the reference, and it will leak if you don't.
All kind of weirdness will happen (the Vi will stay in the panel, even if the owner of the subpanel stops, the Vi will be locked, etc). You'll have to restart LabVIEW (and fix the code).
This might be fixed in very recent versions (>20), but NI never acknowledged the problem so I doubt it.
Good thing i never found it before, then! 😄