Error 1 When Closing .NET References in LabVIEW

Updated Nov 21, 2023

Reported In


  • LabVIEW

Issue Details

I am using LabVIEW .NET constructors. When attempting to close the .NET references of the children, I receive Error 1: Input Parameter is Invalid in LabVIEW:
Error 1 occurred at an unidentified location

Possible reason(s):

LabVIEW: (Hex 0x1) An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @.
Command requires GPIB Controller to be Controller-In-Charge.


You can find this error when closing child .NET references after closing a parent .NET reference. When LabVIEW closes a reference, it immediately invalidates a reference, but may not immediately deallocate the memory space. Closing a parent .NET reference also closes all child references, but these may also not be deallocated immediately from memory.

To solve this, ensure that you close only the parent .NET reference and the children will automatically close, or close the child references before the parent.

Additional Information

There is a known issue for earlier versions than LabVIEW 2021 that consist of using one close reference function when using .NET references in a subVI and then another in the main VI to successfully release the resource. 

This is an unexpected behavior that has been fixed in LabVIEW 2021 and newer releases of software. If a developer has previously used both close reference functions and migrated code to LabVIEW 2021 or newer, 'error 1' is most likely to occur. So, in order to correct this, taking away the second function or modifying the code is needed.