Solution
Error 42 is a generic LabVIEW error and can occur because of multiple reasons. Since the VI runs correctly on one Windows OS version and not on a higher version, you can check for the
compatibility of LabVIEW and the OS.
Since the earliest version compatible with Windows 10 is LabVIEW 2015, the file developed using LabVIEW 2014 will not be supported and will show unexpected behaviour.
To resolve the error, either use Windows 8 or lower to run the VI or compile the files for LabVIEW 2015 or higher versions and then run them on a Windows 10 system.