This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

Error 8 in LabVIEW Application Builder Module When Creating an Executable

Updated Nov 14, 2023

Reported In

Software

  • LabVIEW Application Builder Module
  • LabVIEW

Issue Details

  • I am trying to create an application using the LabVIEW Application Builder Module but I'm unable to, due to writing permissions on my C:\Program Files(x86)directory. I am getting the following message in the error file: 
This error can be due to an option selected while setting up the build for your executable-Copy error code files in the Advanced section of Application Builder. Copy error code files adds copies of XML-based LabVIEW error code text files from the project\errors and user.lib\errors folders to the run-time engine. 
  • When I try to create an application using the LabVIEW Application Builder Module, I get the following error message:
The build was unsuccessful. 

Possible Reasons
An error has occurred. Expand the Details section for more information.

Details 
Visit the Request Support page at ni.com/ask to learn more about resolving this problem. Use the following information as a reference:


Error 8 occurred at Copy in AB_Engine_Copy_Error_Files.vi->AB_Application.lvclass:Copy_Error_Files.vi->AB_Application.lvclass:Copy_Files.vi-...
 

Solution

This error can occur due to multiple causes, such as missing permissions or privileges, firewall configurations, file sizes, and others. Try the following steps to solve the issue.

  • Check permissions on the destination directory. When building an application on a shared network drive, there may be insufficient write permissions to the drive, causing the error. Saving the executable to a local drive will solve this issue.
  • Make sure to compile using the Windows administrator user (especially if compiling to restricted directories, such as C:\).
  • Make sure the destination folder is empty and there are no other files that the LabVIEW Application Builder Module needs to overwrite.
  • Ensure that any previous versions of the compiled application are not open or running in the background. It may be using the same resources that the new compilation is trying to access.
  • If the PC is using an auto-backup feature, files that are not currently backed up may be locked. This will cause the error due to the auto-backup feature requesting administrative privileges to edit or remove a file that is not currently backed up.
    • Either turn off this feature or save the files in a different location that does not have this feature enabled.
  • Another application may be accessing the same file, or the file is already open when creating the executable. For more information and steps to solve this issue refer to the Error 8 When Writing to or Reading from a File article.
  • Windows firewall or the local anti-virus program may be blocking the application. Disable both and try to build the application again.
  • This error can also appear if the file size of the executable is too large (900 MB). Follow the section Rules for Better Memory Usage on the VI Memory Usage product documentation page of LabVIEW.
  • Try building the application on a Network Drive to ensure that no other software is using the same files.
  • If the application is attempting to write files to C:\Program Files (x86), ​​​ complete the next steps: 
    • From the Project Explorer view, right-click Build Specifications. Select New»Application (EXE).
    • Select the Advanced category of Application Builder and uncheck Copy error code files option as shown below:
      • Disabling this option prevents the Application Builder from writing error log files to the C:\Program Files (x86) directory
    • Rebuild the application and observe if the error was solved.
  • For VI's built in LabVIEW 8.5 that have been compiled to LabVIEW 2009 or higher, uncheck the Use LabVIEW 8.x file layout option in the Build Specifications as shown below:
  • The error may be caused by incomplete installation. To verify whether this is the case, reinstall LabVIEW and the LabVIEW Application Builder Module. For more information, refer to Installing, Updating, Repairing, and Removing NI Software