Error 1172 When Calling MATLAB-built DLL in LabVIEW

Updated Apr 17, 2023

Reported In

Software

  • LabVIEW

Issue Details

Error 1172 like the screenshot below occurred when I execute LabVIEW VI which calls MATLAB-built DLL (dynamic link library). The LabVIEW application is working well previously, but suddenly this error came out after the Windows update.

Error 1172
Constructor Node Error creating instance of DetectaGridPointClass in assembly detectGridPointCompNative.DetectGridPointClass, detectGridPointCompNative, Version-1.0.0.0, Culture=neutral, PublicKeyToken=null, 
(System.Exception: MWArray assembly failed to be initialized
Inner Exception: System.Exception: The MATLAB Runtime instance could not be initialized
Inner Exception: System.ApplicationException: The MATLAB Runtime instance could not be initialized
segv - SEVERE ERROR)



Error 1172
 

Solution

This error 1172 is a generic error for Constructor Node that relate to an exception error.
You will need to check the details of the exception error as this might cause by various reasons that interrupt the normal flow of the application.

In the case above, this is normally caused by a corrupted MATLAB runtime folder cache.
You can solve it by deleting the cache folder in the directory below and relaunching the application.

C:\Users\<username>\AppData\Local\Temp\<username>\mcrCacheX.X where X.X is the MATAB runtime version number.