LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bug in dynamic VIs

Using LabVIEW 8.5.1, I'm getting the following error in my executable when it calls any of the dynamic VIs in a particular class:

 

"This dynamic subVI cannot execute because the needed member VI cannot be found."

 

This is followed by an unhelpful description of which VI is the culprit, typically 'X.vi was stopped at unknown "" at a call to X.vi'. When I do manage to track down which VI is causing trouble, I find it right where it should be in the support directory, along with the other VIs in its class.

 

The only workaround I've found is to make the offending VI be static rather than dynamic. That worked the first couple times I got the error, but now it seems to be affecting a whole class; when I make one sub-VI static, the error just pops up at the next call to a dynamic member of that class. Unfortunately (of course) some of these VIs actually need to be dynamic; I override them in subclasses and can't just arbitrarily make them static.

 

I will try to replicate this in a small project and post an example, but it only started happening when my project became very large (a few dozen classes, several hundred VIs all told), and seems to happen to random VIs, or in this case a random class, so it might be hard to reproduce. Also, it only occurs in the executable--the program runs just fine from within LabVIEW.

 

If anyone has seen this error and knows a better workaround, I would be most appreciative!

0 Kudos
Message 1 of 4
(3,276 Views)

Thurtell wrote:

...

 

If anyone has seen this error and knows a better workaround, I would be most appreciative!


I delivered a LVOOP based app as an exe that used dynamic Classes and had no trouble. The only advise I can offer is to watch were the files are saved and do "Save all this class" (from the project window) regularly.

 

Sorry I can't be of more help,

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 4
(3,271 Views)

I have had the same issue.  I'm sorry that I only encountered it, and the solution, years after Thurtell's original post, and after days of gnashing my teeth trying to fix it.  Maybe this will help others.  First, the solution: delete the dynamic VI that is causing the complaint at the top-level diagram level, and then repace and wire it so that your code looks exactly as it did before.  The problem will go away.  That's it!

 

The issue is that there is a bug in labview that affects projects using OO code and XControls - at least, this was my issue. Regardless, My solution may help in other situations.

 

A little more background: I have a project that contains OO code with a single dynamic VI in the top-level application.  That single dynamic VI can "become" many other VIs depending upon which type is passed into it.  In the same project, I have a custom XControl.  Whenever I edit the XControl (right-clicking on it and going into edit mode) and then stop editing it (again, by right-clicking and selecting "apply to all instances"), my OO VI starts generating the run-time error described in the original post.  When I erase and replace the OO VI in the top level diagram, the problem goes away.  The exact text of the (unhelpful) error is:

 

This dynamic subVI cannot execute because the needed member VI cannot be found. Probe the wire going into the dynamic terminal to see the data type. Then open that LabVIEW class. Open the member VI of the class that has the same name as the dynamic subVI.

 

If you follow the error text's instructions, you can spend a long time hunting for a non-existant problem in your code.  If you remove the code it's complaining about, it will move on to other innocent code and complain about that instead.  I have called tech support and they didn't know of this issue, but have accepted that it is a bug, and are "looking into it."  I am using labview 2010 on windows XP SP3.  Tech support reports that the issue was not reproduceable in windows 7, so perhaps NI won't bother fixing this, since it is esoteric, presumably will go away with XP, and there is a workaround.  However, it is annoying to deal with this every time I edit the XControl.

 

I don't know if it matters, by the only other connection between OO and the XControl, besides being in the same program or VI, is that the OO VIs contain a reference to the XControl and manipulate it from within OO methods.  However, this is a run-time error, and is not detected at edit time.

Message 3 of 4
(2,960 Views)

Thanks for that post Code Ferret!

 

Intersting read and I will keep my eye open. After reading your post I now have to think I may have seen the same error in an earlier version of LV (delete replace to fix) but did not investigate further.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 4
(2,932 Views)