File Writing DLL Crashes LabVIEW

Updated Jan 20, 2020

Reported In

Software

  • LabVIEW
  • LabVIEW Runtime

Operating System

  • Windows

Issue Details

I call a DLL in my VI. When the DLL tries to write a file, LabVIEW closes completely without any message.

Solution

Your DLL might be written in such a way, that it will create a folder to save the file, where the programm is running.

If you start LabVIEW first, this folder is the installation folder of LabVIEW.
Since installation folders are protected, Windows will close a programm, which tries to write there.

The best way to solve the problem is to change the DLL in such a way, that you can specify the location for the file.

If you can't change the DLL, there are different workarounds:
  • Build an executable from your VI. The executable will run in the folder of the executable.
  • Start LabVIEW with admin rights. The file will be save to the position of the shortcut icon.
  • Close LabVIEW completely and run the VI from the windows explorer via double-click.