Solution
The observed behavior can occur when the Microsoft .NET Framework Common Language Runtime (CLR) encounters an internal assertion failure while performing Just-In-Time (JIT) compilation of loaded .NET assemblies.
Analysis of the executable crash dump identified an assertion failure within clrjit.dll with the following call stack pattern:
clrjit!Compiler::fgPerBlockLocalVarLiveness
clrjit!noWayAssertBody
clrjit!fatal
Exception Code:
To mitigate the issue, perform the following steps:
-
Upgrade Microsoft .NET Framework to version 4.8 or 4.8.1 on all target systems.
-
Install all available cumulative Windows updates.
-
Disable JIT compiler optimizations by configuring the following environment variable:
COMPlus_JITMinOpts=1
This variable can be configured system-wide or defined within an application launcher script before launching the LabVIEW executable.
- Pre-compile .NET assemblies by using the Native Image Generator (ngen.exe) to perform ahead-of-time compilation and reduce dependence on runtime JIT compiler optimization.
Open an elevated Command Prompt and run:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen.exe install "C:\Path\To\YourDotNetLibrary.dll"
Verify that all loaded .NET assemblies and native dependencies target 64-bit architectures (x64 or AnyCPU) and are compatible with the LabVIEW executable architecture.
Generate and review crash dump files if the problem persists to confirm whether the failure remains within clrjit.dll or has shifted to another component.