LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Executable looking for a VI and failing to launch

Hello,

 

Recently, I migrated from LV 2018 to LV 2024 Q3. There has been no issue compiling and running an EXE file with LV 2018. There is also no issue compiling it with LV 2024 but if I run the EXE, it looks for a certain VI as shown below.

 

1.png

 

I can find its file path in the project file viewer.

 

2.png

 

If I manually locate the file, the executable throws an error and fails to run.

 

3.png

What should I be looking into?

 

Thank you.

 

0 Kudos
Message 1 of 11
(884 Views)

The application builder is probably erroneously not including this file in the EXE build.

 

One thing to try would be going to the build specification you're using, and unchecking everything on the "Additional exclusions" options page.  Doing so will make your EXE larger because it doesn't exclude files that it used to include, but can help when it gets a little too aggressive in its filtering out of files.

 

Another option would be going to the "Source files" options page on the build, finding that VI, and adding it to the "Always included" section.

0 Kudos
Message 2 of 11
(845 Views)

Hello Kyle,

 

I unchecked everything on Additional Exclusions. The EXE builder threw an error complaining about all the 'VI Tree' VIs in instr.lib that are broken and not meant to run. I had to put a diagram disable structure for each of them to make them unbroken. Then I could successfully compile the EXE file. When I run it, it still looks for the same VI in the OP. The callers of subTimeDelay.vi are in the Automotive Diagnostic Command Set addon library.

 

4.png

 

Both VI and ADCS library are under My Computer > Dependencies > vi.lib on the project viewer. On Source Files, Dependencies are not shown in the Project Files box.

 

Thank you.

 

0 Kudos
Message 3 of 11
(825 Views)

I moved the particular VI out of Dependencies so I can select it in Source File Settings. It is Always Included. When I compile and run the EXE, it still looks for the VI. It must be one special VI!

 

5.png

 

The file paths for LV 2018 and 2024 are compared below.

 

comp1.png

 

comp2.png

 

 

0 Kudos
Message 4 of 11
(732 Views)

I am having a similar problem with compilation in LV2024. I have a File Dialog express VI which has the subFile Dialog.vi as a dependency. When I run the compiled executable, it looks for the file. Note the oddly formed loading address; "..\builds\Large Bore Gas Gun\LBGG v2" is repeated twice.

 

I have tried unticking all the items in the Additional Exclusions pane and the executable got bigger, but the situation persists.

 

I can force the specific file to be always included and package it in the \data folder, and then point the exe to the file. This allows the executable to run fine, but is obviously not acceptable in a deployed application!

 

MaxJoseph_0-1742464240807.png

 

CLA - Kudos is how we show our appreciation for comments that helped us!
0 Kudos
Message 5 of 11
(251 Views)

@MaxJoseph wrote:

I am having a similar problem with compilation in LV2024. I have a File Dialog express VI which has the subFile Dialog.vi as a dependency. When I run the compiled executable, it looks for the file. Note the oddly formed loading address; "..\builds\Large Bore Gas Gun\LBGG v2" is repeated twice.

 

I have tried unticking all the items in the Additional Exclusions pane and the executable got bigger, but the situation persists.

 

I can force the specific file to be always included and package it in the \data folder, and then point the exe to the file. This allows the executable to run fine, but is obviously not acceptable in a deployed application!


Try adding the file to "Always include" section

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 11
(239 Views)

I have had similar issues with 2024Q3 and the compiler. For example, it could not find the trim whitespaces VI in an EXE. 

 

The only solution that worked for me.

  1. Erase the Object Compiled Cache.
  2. Mass compile your project
  3. Delete your build EXE from project.
  4. Start with a new EXE added to the project and proceed from there.

It is a PITA and hopefully NI will fix this.

Message 7 of 11
(227 Views)

I can add the file Always Included does not fix the issue. I can include the file in the \data folder using the Source File Settings tab, but this does not fix the issue, although it does mean I can point the exe to the file and it runs fine.

 

I have tried Mass Compile and rebuilding the exe, but still the same issue.

 

It does feel like a compiler issue, I will try updating to 2025 and see if it fixes the issue.

CLA - Kudos is how we show our appreciation for comments that helped us!
0 Kudos
Message 8 of 11
(212 Views)

This might be double post, as I thought I posted something earlier.

 

Delete the BUILD EXE in your project and create a new one. Once it becomes problematic, there appears no way to repair it.

0 Kudos
Message 9 of 11
(197 Views)

Yes, I tried deleting the Build EXE and rebuilt it. Sadly it didnt work. Next thing to try is installing LV2025 and starting with a fresh project.

CLA - Kudos is how we show our appreciation for comments that helped us!
0 Kudos
Message 10 of 11
(183 Views)