Application With Call Functions Crashes With Access Violation Error

Updated Feb 26, 2020

Reported In

Software

  • LabVIEW
  • LabVIEW Application Builder Module

Operating System

  • Windows

Issue Details

My program uses Call Library Function Nodes or ActiveX calls and runs as expected in the LabVIEW Development Environment. When I try to run my program as an executable, I receive the next error:



​How do I resolve this?

Solution

This specific behaviour is caused by linking to a system library by its path, rather than by the name of the library. Referring to the library by its path causes LabVIEW to include that path in the build specification of the executable, which will then cause a crash on execution.

To prevent this, change from using the absolute file path for the library or object you are calling to either the relative file path or just the name.

For example, if you need to call User32.dll, you could use either the absolute file path C:\Windows\System32\user32.dll, the equivalent relative file path %windir%\System32\user32.dll, or user32.dll the within the Call Library Function options menu. Either of the latter two will prevent this crash.