Admin Production ni-theme
Current Publication

User Protection

LabWindows/CVI

User Protection

User protection detects invalid program behaviors that LabWindows/CVI cannot otherwise detect during compilation. LabWindows/CVI reports these kinds of invalid program behaviors as user protection errors. When you set the debugging level to Standard or Extended, LabWindows/CVI maintains extra information for arrays, structures, and pointers and uses the information at run time to determine the validity of addresses.

Two groups of user protection errors exist based upon two characteristics: severity level and error category. In each case, the ANSI C standard states that programs with these errors have undefined behavior. The two severity levels are as follows:

  • Non-Fatal errors include expressions that are likely to cause problems but do not directly affect program execution. The expression is invalid and its behavior is undefined, but execution can continue. Examples include bad pointer arithmetic, attempts to free pointers more than once, and comparisons of pointers to different array objects.
  • Fatal errors include expressions that LabWindows/CVI cannot execute without causing major problems, such as a general protection fault. For example, dereferencing an invalid pointer value is a fatal error.

Error categories include pointer protection, dynamic memory protection, general protection errors, and library protection.