LabVIEW Error 1502 When Building an Application

Updated Jul 31, 2018

Reported In

Software

  • LabVIEW Application Builder Module
  • LabVIEW

Other

LabVIEW Application Builder

Issue Details

I get error 1502 when trying to build an application with LabVIEW:

An error occurred while building the following file:

<File Path>

The VI became broken during the build process. Open the Build Specification and enable debugging to include the front panel and block diagrams.
 

Solution

Error 1502 occurs when the Application Builder attempts to load VI dependencies or block diagrams after the they have been removed from the build. 

There are several settings in the Source Distribution Properties Dialog Box which typically resolve this issue. 
Changing these settings will slightly increase the size of the application. However, it will not greatly affect execution speed.

1) The first option is to include the front panel and block diagram of the VI that is causing the error.  Navigate to the Source File Settings category and select the VI that is causing the error. Uncheck the Remove block diagram box. If the VI is not listed in the Project Files section, then select Dependencies. Uncheck the Remove front panel and Remove block diagram boxes



2) Uncheck the following settings in Additional Exclusions as seen in the screen shot below:
  1. Disconnect type definitions 
  2. Remove unused members of project libraries 


3) Another option that can be effective for solving this problem is to Enable debugging in the Advanced category. Checking this option will include block diagrams that will greatly increase the application size (by approximately double), but will almost certainly resolve this error.


 

Additional Information

This error is commonly caused by building an application from a VI that has code which will never execute; for example, having a constant wired to the selector terminal of a case structure. In addition, this may be caused by deleting or removing SubVIs and dependencies from the project that may still be loaded in memory. 

If you continue to run into issues with your subVIs not executing after resolving this error, try unchecking Remove unused polymorphic VI instances and Disconnect unused inline subVIs under the Additional Exclusions section when building your executable.

WAS THIS ARTICLE HELPFUL?

Not Helpful