LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"missing subVIs" error when trying to run a dynamically loaded VI from built executable

I have a project for which I am trying to produce a functional executable. The project makes use of several dynamically called VIs that, when called, run independently of the top-level VI that invokes them.

 

All of this works well prior to trying to turn it into an executable.

 

In the case of the executable however, one of these dynamically-loaded VIs, opens with a broken run arrow. Clicking on the broken arrow reveals that there are one or more instances of six “missing subVIs”.

 

I have tried setting the build target to be both an EXE & LLB or just a big EXE (same result when tested) and when I look in the LLB (or the stand-alone EXE after renaming it as an LLB) I can see all six subVI files there.

 

I have tried telling the app builder to include the six subVIs as dynamically-loaded VIs – that didn’t help either.

 

One thing all six subVIs have in common is that each contains at least one call to one of several custom DLL library routines. The DLL files are included in the build as support files and show up in the DATA folder produced by the build.

 

I have taken  the .BLD file and have removed the desired VI as the top-level VI and promoted the problem dynamically-called VI to the top-level VI and built it as an EXE (no other changes) and when I try to run that, it works just fine. I have then taken that exact same .BLD file, demoted the top-level VI back to a dynamically-called VI and re-specified the desired VI as the top-level VI and rebuilt the application and once again the dynamically-called VI opens up broken when it is called.

 

This is under LabVIEW 7.1.1 and WinXP SP2.

 

Is there a fix for this?

 

0 Kudos
Message 1 of 10
(3,466 Views)

Just a followup...

I have found three ways to fix this. This is what I found (in the order that I found it):

  1. Off to the side in the main top-level VI, I can include a case structure wired to a Boolean (false) constant and in the true case (the case not executed), include the missing subVIs needed by the dynamically-called VI. This will fix the problem.

    or
  2. Off to the side in the main top-level VI include a case structure wired to a Boolean (false) constant and in the true case (the case not executed), I can include the various Call Library nodes used by the "missing" subVIs needed by the dynamically-called VI. This will fix the problem.

    (This would seem to say that the "missing" subVIs were not really missing but rather the DLLs referenced by the subVIs could not be found. The "missing subVI" error message is therefore a bit bogus but it is perhaps the best that LabVIEW can do at this point since the block diagrams are missing from the subVIs.)

    or
  3. Up to this point the DLL files had been explicitly called out in the .BLD specification as support files. I removed them as support files so that all I had called out on the application-builder "Source Files" tab were just the dynamically-called VIs and the one top-level VI. I rebuilt the project and it worked properly. This is true even after I removed fixes #1 and/or #2 above from the top-level VI. Evidently the inclusion of the DLL files as support files (in this case) confused things. In either case, the DLL files did get included in the "Data" folder produced by the application builder.

FWIW, all the testing referred to here was done on the same machine where the executables were built. After I had a working executable I was able to move it to a different machine which only had the run-time engine and it ran properly there too.

0 Kudos
Message 2 of 10
(3,431 Views)

have you tried checking to see if the path to the dynamic vi's are correct, The path will not be the same to them when built as an executable.

Dev Path c:\viname

Build Path c:\data\viname

when you do the build allow debugging so that you can check to make sure that the paths are correct.




Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 3 of 10
(3,425 Views)

The path to the Dynamic VIs wasn't an issue.
The invoking routine is setup to find them whether they are in a folder or LLB file or EXE file.
As was stated in my original post, one of the dynamic VIs would open, it just would not run and it reported that some of its subVIs were missing.

0 Kudos
Message 4 of 10
(3,421 Views)

Hi,

 

I have a similar problem.

I need to make an exe file from a main vi which uses three different dll files. the dll files were originally written in C++ and i converted them to Labview vis. these vis have been then used in the main vi.

To make the exe file, I tried adding everything to the always including tab of source files. but after building the exe file,  they are not added in the directory and there is error that it cannot find all of the vis from the dll libraries.

Do you have any clue on how to fix this?

Thanks!

0 Kudos
Message 5 of 10
(2,922 Views)

Put one indicator and verify what is the path when you run the application(exe). How you are building the path in exe file?

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 6 of 10
(2,920 Views)

I dont know what you mean by putting an indicator?

 

How I make the exe file:

I have a project where my main vi is included plus the dll files and all the vis that are created when converting the C++ codes in the dll library. then I go to build specifications and add my main vi as the "startup vi" in the "source file category" at the left of the window and add the other dependant vis and libraries to the "always included" window in the the same page. and then press build. 

When I press generate preview i also dont see the dependant vis?

 

 

0 Kudos
Message 7 of 10
(2,915 Views)

Are you dynamically calling the VIs (meaning by file location) or are you calling them directly?  If calling them directly, then the VIs are in the EXE.  What is likely missing is your DLLs.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 10
(2,906 Views)

Yes, the vis are in my exe file. as when i generate the preview only dlls are added to the data. I attached the preview page.

I also attached the error i get when running the exe file. it is possible that the dlls are somehow missing or it cannot correlate the vis (derived from the dll library) with the dll.

Do you know how I can properly add the dlls and its corresponding vis to the exe file?

 

Thanks

Download All
0 Kudos
Message 9 of 10
(2,887 Views)

Actually, i have to make it clear that I am not dynamically loading my vis. 

0 Kudos
Message 10 of 10
(2,879 Views)