Access Violation 0xC0000005 Crash When Launching LabVIEW Executable

Updated Apr 9, 2024

Reported In

Software

  • LabVIEW
  • LabVIEW Application Builder Module

Issue Details

  • When trying to run my LabVIEW executable, it crashes and gives an access violation 0xC0000005 error.
  • When I run my application in the development environment it works correctly, but if I create an executable for my application  and run it I receive the following error: Exception: Access violation (0xC0000005) at EIP=0x5F02725B
 
  • I've created an application that recalls the GetWindowTextA function in the Windows user32.dll. Sometimes when running my program in the development environment, and always when running an executable of the program, I receive the following error: Exception: Access violation (0xC0000005) at EIP=0x64D332C7
How can I fix this behavior?

Solution

For resolving the Exception: Access violation (0xC0000005) at EIP=0x5F02725B issue try the following troubleshooting steps:
  1. Create new a LabVIEW project
  2. Drag and drop all the .vis and files used in the project that you used for building the executable
  3. Save the project
  4. Repeat the saving process but this time select Save As and duplicate the project with all dependencies as shown in the figure below.
  1. Close the project and then open the last saved
  2. Create the executable

For resolving the Exception: Access violation (0xC0000005) at EIP=0x64D332C7 issue try the following troubleshooting steps:
  1. Open the .vi where you are calling the GetWindowTextA function in the Windows user32.dll 
  2. Increase the dimension, in terms of space, of the constant (item 1 in the figure below) connected to the CStr IpString terminal (item 2 in the figure below). This constant is used for determine the available space in the buffer
 

Additional Information

An access violation error may be, but is not always, caused by a lack of permissions.  This may happen when trying to start a program you don't have access to, or when a file tries to access a folder it doesn't have access to.  The problem may be due to a lack of administrator privileges. Or it can be related to an antivirus or security software preventing the executable from running correctly.

Any time you see a LabVIEW crash, please submit the crash report to NI. You can do this by clicking Send in the LabVIEW Crash Reporter dialog box. These crash reports are analyzed by NI to make improvements to our products.