# Run-time Errors and Warnings

The following table is an alphabetized list of fatal and non-fatal run-time errors generated by LabWindows/CVI.

Error Message | Type Error | Comment
# flag is valid only with o, x, e, f, and g specifiers. | Non-Fatal Run-time Error | Ensure that you use the correct format specifier, and that no extra characters exist before the format specifier.
0 flag is not valid with c, s, p, and n modifiers. | Non-Fatal Run-time Error | Use of an incorrect format specifier or use of a field width starting with 0 might cause this error.
Argument 4 must be 0 or 1. | Fatal Run-time Error | Value of the argument to the library function must be 0 or 1.
Argument must be a function pointer to the correct type of callback function. | Non-Fatal Run-time Error | Argument to the function is not a pointer to the expected type of callback function.
Argument must be an open stream. | Fatal Run-time Error | Argument to the I/O library function must be one of the standard streams (stdin, stdout, stderr) or a stream you open with the fopen or freopen functions.
Argument must be character. | Fatal Run-time Error | Value of the argument to the library function must be less than 256.
Argument NUMBER must be 0, 1, or 2. | Fatal Run-time Error | Value of the argument to the library function must be 0, 1, or 2.
Array argument too small (NUMBER bytes). Argument must contain at least NUMBER bytes (NUMBER elements). | Fatal Run-time Error | Library function requires an array that is larger than the specified argument. Make sure you declare or allocate the array with the number of elements this error message reports.
Argument too small. | Fatal Run-time Error | The library function called requires an argument that is larger than the argument passed. If this is an array argument, check that the array was either declared or allocated with sufficient elements for the function call. If this is a scalar argument, make sure that the scalar is the correct type.
Array index (NUMBER) too large (maximum: NUMBER). | Non-Fatal Run-time Error | You indexed an array past the last element.
Assertion error: EXPRESSION. | Fatal Run-time Error | Value of the argument EXPRESSION to the Standard C Library macro assert is 0.
Assignment of invalid pointer value. | Non-Fatal Run-time Error | Value you assigned to a pointer is an invalid pointer value. Check the right side of the assignment to determine if it is the result of a previous invalid pointer operation.
Assignment of out-of-bounds pointer: NUMBER bytes before start of array. | Non-Fatal Run-time Error | Value you assigned to the pointer refers to an invalid location, which is NUMBER bytes before an array. The right side of the assignment is probably the result of previous illegal pointer arithmetic.
Assignment of out-of-bounds pointer: NUMBER bytes past end of array. | Non-Fatal Run-time Error | Value you assigned to the pointer refers to an invalid location, which is NUMBER bytes past the end of an array. The right side of the assignment is probably the result of previous illegal pointer arithmetic.
Assignment of pointer to freed memory. | Non-Fatal Run-time Error | Value you assigned to the pointer is invalid because it refers to a location in dynamic memory that the free function deallocated. After memory is free, all pointers into that block of memory are invalid.
Assignment of uninitialized pointer value. | Non-Fatal Run-time Error | Value you assigned to the pointer is invalid because it was not initialized. The right side of the assignment is probably an uninitialized local variable or an object in dynamic memory that you allocated with malloc. Initialize local variables and dynamic memory before you use them. calloc both allocates and initializes dynamic memory.
Attempt to free invalid pointer expression. | Fatal Run-time Error | Pointer value you passed to the free function is invalid. It is probably the result of a previous invalid pointer operation.
Attempt to free pointer to freed memory. | Fatal Run-time Error | Pointer value you passed to the free function refers to a location in dynamic memory that you already deallocated.
Attempt to free uninitialized pointer. | Fatal Run-time Error | Pointer value you passed to the free function is invalid because you did not initialize it. It is probably an uninitialized local variable. Initialize local variables before you use them.
Attempt to read beyond end of array. | Non-Fatal Run-time Error | Source array is not large enough to satisfy the destination specifiers.
Attempt to read beyond end of string. | Non-Fatal Run-time Error | Source string is not large enough to satisfy the destination specifiers.
Attempt to realloc invalid pointer expression. | Fatal Run-time Error | Pointer value you passed to the realloc function is invalid. It is probably the result of a previous invalid pointer operation.
Attempt to realloc pointer to freed memory. | Fatal Run-time Error | Pointer value you passed to the realloc function refers to a location in dynamic memory that you already deallocated.
Attempt to realloc uninitialized pointer. | Fatal Run-time Error | Pointer value you passed to the realloc function is invalid because you did not initialize it. It is probably an uninitialized local variable. You must initialize local variables before you use them.
Attempt to write beyond end of array. | Non-Fatal Run-time Error | Output array is smaller than the given format specifiers and input parameters require.
Attempt to write beyond end of string. | Non-Fatal Run-time Error | Output string is smaller than the given format specifiers and input parameters require.
b modifier must precede o modifier. | Non-Fatal Run-time Error | If both the b and o modifiers are present, the b modifier must precede the o modifier.
Byte ordering is invalid. | Non-Fatal Run-time Error | Byte ordering that the o modifier specifies is not valid for the size of the integer. The number of digits following the o must match the size of the integer, and the digits must fall in the range zero to sizeoftheinteger1.
c modifier valid only with l format specifier. | Non-Fatal Run-time Error | c modifier is only valid for the l format specifier.
Cannot free: memory not allocated by malloc or calloc. | Fatal Run-time Error | Pointer value you passed to the function free is invalid because it does not point to dynamic memory allocated by malloc or calloc. free can deallocate only pointers you obtain from one of these two functions.
Comparison involving null pointer. | Non-Fatal Run-time Error | One of the pointer expressions in the comparison has the value NULL. Both expressions in pointer comparisons must point into the same array object.
Comparison involving uninitialized pointer. | Non-Fatal Run-time Error | One of the pointer expressions in the comparison is invalid because you did not initialize it.
Comparison of pointers to different objects. | Non-Fatal Run-time Error | Pointer expressions in the comparison point to two distinct objects. Both expressions in pointer comparisons must point into the same array object.
Comparison of pointers to freed memory. | Non-Fatal Run-time Error | One of the pointer expressions in the comparison is invalid because it refers to a location in dynamic memory that you deallocated with the free function. Once you free the memory, all pointers into that block of memory become invalid.
Could not allocate stack space. Try decreasing the Maximum stack size option in the Run Options dialog. | Fatal Run-time Error | There is insufficient memory to allocate the Maximum Stack Size you have specified. LabWindows/CVI allocates the maximum size on the stack at the beginning of execution.
d modifier not valid in Fmt/FmtOut/FmtFile. | Non-Fatal Run-time Error | d modifier cannot be used in Fmt, FmtOut, or FmtFile.
Dereference of a NUMBER byte object where only NUMBER bytes exist. | Fatal Run-time Error | Pointer expression you dereferenced points to an object that is smaller than the type of the dereference. For example, if an int pointer points to an object of type char, you cannot dereference the pointer because it points to only 1 byte, whereas an int requires 4 bytes.
Dereference of data pointer used as a function. | Fatal Run-time Error | You converted a data pointer to a function pointer and then dereferenced it. You can examine or modify data, but you cannot execute it as a function.
Dereference of function pointer used as data. | Fatal Run-time Error | You converted a function pointer to a non-function pointer and then dereferenced it. You can only execute functions and access them as data.
Dereference of invalid pointer expression. | Fatal Run-time Error | Pointer expression you dereferenced is invalid. It is probably the result of a previous invalid pointer operation.
Dereference of null pointer. | Fatal Run-time Error | Pointer expression you dereferenced has the value NULL and cannot be dereferenced.
Dereference of out-of-bounds pointer: NUMBER bytes (NUMBER elements) before start of array. | Fatal Run-time Error | Pointer expression you dereferenced is invalid because it refers to a location before the start of an array. The error message shows the number of bytes and the number of array elements in the array. The expression is probably the result of previous illegal pointer arithmetic.
Dereference of out-of-bounds pointer: NUMBER bytes (NUMBER elements) past end of array. | Fatal Run-time Error | Pointer expression you dereferenced is invalid because it refers to a location past the end of an array. The error message shows the number of bytes and the number of array elements past the end of the array. The expression is probably the result of previous illegal pointer arithmetic.
Dereference of pointer to freed memory. | Fatal Run-time Error | Pointer expression you dereferenced is invalid because it refers to a location in dynamic memory that you deallocated with the free function. Once memory is free, all pointers into that block of memory become invalid.
Dereference of uninitialized pointer. | Fatal Run-time Error | Pointer expression you dereferenced is invalid because you did not initialize it. It is probably an uninitialized local variable. You must initialize local variables before you use them.
Dynamic memory is corrupt. | Fatal Run-time Error | LabWindows/CVI encountered corrupt data while allocating or freeing dynamic memory.
Error at or near character NUMBER in the format string: STRING. | Non-Fatal Run-time Error | Error exists in the format string at index NUMBER. NUMBER is 1-based.
Format string integer is too big. | Non-Fatal Run-time Error | Integer used in the format string is too large.
Function FUNCTION: (STRING == NUMBER). | Non-Fatal Run-time Error | Library function could not perform its task. The integer NUMBER is either the function return value or the value of a global variable that explains why the function failed. Refer to the library function reference material for more information about the error.
h modifier is only valid with d, i, n, o, u, and x specifiers. | Non-Fatal Run-time Error | You can only use the h modifier with integer format specifiers.
Illegal argument(s) to library function. | Fatal Run-time Error | One or more of the arguments to the library function are invalid. Refer to the library documentation for the function.
Illegal separator character or illegal position of separator character. | Non-Fatal Run-time Error | Either the separation characters < and > were not present in the format string, or they were in the wrong place.
Illegal value matched to asterisk. | Non-Fatal Run-time Error | Integer argument that matches to an asterisk (*) in the format string has an invalid value given the context in which it appears.
Invalid pointer argument to library function. | Fatal Run-time Error | Pointer expression you passed to the library function is invalid. It is probably the result of a previous invalid pointer operation.
Invalid size for a real. | Non-Fatal Run-time Error | 4 and 8 are the only valid sizes that you can specify with the b modifier for the f (real) specifier.
Invalid size for an integer. | Non-Fatal Run-time Error | 2, and 4 are the only valid sizes that you can specify with the b modifier for the i, d, x, o, and c modifiers.
l format specifier not valid in Fmt/FmtOut/FmtFile. | Non-Fatal Run-time Error | You can use the l format specifier only in Scan, ScanOut, and ScanFile.
l modifier is only valid with d, i, n, o, u, and x specifiers. | Non-Fatal Run-time Error | l format specifier is valid only for integer format specifiers.
L modifier is only valid with e, f, and g specifiers. | Non-Fatal Run-time Error | L modifier, which specifies that the argument is a long double, can be used only in the floating point formats.
l modifier is only valid with e, f, g, d, i, n, o, u, and x specifiers. | Non-Fatal Run-time Error | l format specifier is valid only for integer and real format specifiers.
Library function error (STRING == NUMBER). | Non-Fatal Run-time Error | Library function could not perform its task. The integer NUMBER is either the function return value or the value of a global variable that explains why the function failed. Refer to the library function reference material for more information about the error.
Missing argument to variable argument function. | Fatal Run-time Error | Variable argument function requires at least one argument beyond the last formal parameter.
Missing format string integer. | Non-Fatal Run-time Error | Integer that corresponds to an asterisk in a format string is missing. Incorrect ordering of the arguments can cause this. This integer must precede the actual argument.
Missing return value. | Fatal Run-time Error | Function does not return a value, although you declared it with a return type. If you did not intend for the function to return a value, you must declare it as a void function. Otherwise, you must use a return statement to return a value.
Missing right bracket(]). | Fatal Run-time Error | Format string has mismatched brackets.
Missing terminating null in string argument. | Fatal Run-time Error | Library function expects a string argument, but the argument you passed points to an array of characters that is not null-terminated.
Non-terminated addresslist. | Fatal Run-time Error | You attempted to pass an address list array that you did not terminate with 1 to a GPIB-488.2 function that expects the array to terminate with 1.
Not enough parameters. | Non-Fatal Run-time Error | Number of arguments the format string expects is more than the number of arguments you passed in.
Not enough space for casting expression toTYPE. | Non-Fatal Run-time Error | Block of memory you obtained from malloc or calloc is not large enough for a single object of type TYPE and cannot be cast to that type.
Null pointer argument to library function. | Fatal Run-time Error | Pointer expression you passed to the library function has the value NULL, which is not a valid value for the function.
Null Pointer. | Fatal Run-time Error | Pointer expression you passed to the library function has the value NULL, which is not a valid value for the function.
Number of arguments exceed the maximum supported. | Non-Fatal Run-time Error | Number of arguments exceeds the maximum that the formatting functions support.
Number of points is too large for current waveform buffer. | Fatal Run-time Error | Message appears when the numberofPoints parameter of a data acquisition waveform generation function is larger than the numberofPoints parameter to the function which set up the waveform buffer.
Out of memory for user protection information. | Fatal Run-time Error | Could not allocate memory required to store user protection information.
Out-of-bounds pointer argument (before start of array). | Fatal Run-time Error | Pointer expression you passed to the library function is invalid because it refers to a location that is before the start of an array. The expression is probably the result of previous illegal pointer arithmetic.
Out-of-bounds pointer argument (past end of array). | Fatal Run-time Error | Pointer expression you passed to the library function is invalid because it refers to a location past the end of an array. The expression is probably the result of previous illegal pointer arithmetic.
Out-of-bounds pointer arithmetic: NUMBER bytes (NUMBER elements) before start of array. | Non-Fatal Run-time Error | Pointer arithmetic expression is invalid because the resulting value refers to a location before the start of an array. The error message shows the number of bytes and number of array elements before the beginning of the array.
Out-of-bounds pointer arithmetic: NUMBER bytes (NUMBER elements) past end of array. | Non-Fatal Run-time Error | Pointer arithmetic expression is invalid because the resulting value refers to a location past the end of an array. The error message shows the number of bytes and number of array elements past the end.
Overflow occurred during the conversion of the float. The number is too big for type float. | Non-Fatal Run-time Error | Number was too large to store in a 4-byte real.
Overflow occurred during the conversion of the int. The absolute value is too big for the size. | Non-Fatal Run-time Error | Number was too large to store in the integer of the specified size.
Overflow occurred during the conversion of the int. The signed value is too big for the size. | Non-Fatal Run-time Error | Number was too large to store in the integer of the specified size.
Parameter type incompatible with format specifier. | Non-Fatal Run-time Error | Parameter type is not compatible with the type that the format string expects. An argument is either missing or of the wrong type.
Parameter type mismatch: expecting TYPE but foundTYPE. | Non-Fatal Run-time Error | Parameter type does not match the type that the format string expects. The arguments might not be in the right order, or an argument might be missing.
Pointer arithmetic involving invalid pointer. | Non-Fatal Run-time Error | Pointer arithmetic expression is invalid because one of the subexpressions contains an invalid pointer.
Pointer arithmetic involving null pointer. | Non-Fatal Run-time Error | Pointer arithmetic expression is invalid because one of the subexpressions contains the value NULL.
Pointer arithmetic involving pointer to freed memory. | Non-Fatal Run-time Error | Pointer arithmetic expression is invalid because one of the subexpressions contains a pointer to dynamic memory that you deallocated with the free function. Once memory is free, all pointers into that block of memory are invalid.
Pointer arithmetic involving pointer to function. | Non-Fatal Run-time Error | Pointer arithmetic expression is invalid because one of the subexpressions is a function pointer.
Pointer arithmetic involving uninitialized pointer. | Non-Fatal Run-time Error | Pointer arithmetic expression is invalid because one of the subexpressions contains an uninitialized pointer. It is probably an uninitialized local variable.
Pointer comparison involving address of nonarray object. | Non-Fatal Run-time Error | One of the pointer expressions in the comparison is invalid because it does not point into an array. Both expressions in pointer comparisons must point into the same object.
Pointer is invalid. | Non-Fatal Run-time Error | Pointer argument to the function contains an invalid address.
Pointer points to freed memory. | Non-Fatal Run-time Error | Pointer argument to the function points to memory that you already freed.
Pointer subtraction involving address of nonarray object. | Non-Fatal Run-time Error | One of the pointer expressions in the subtraction is invalid because it does not point into an array. Both expressions in pointer subtractions must point into the same object.
Pointer to free memory passed to library function. | Fatal Run-time Error | Pointer expression you passed to the library function is invalid because it refers to a location in dynamic memory that you deallocated with the function free. Once memory is free, all pointers into that block of memory are invalid.
Reference parameter expected. | Non-Fatal Run-time Error | Function expected a pointer but you passed it a scalar.
Repeat value not valid with s/l format specifiers. | Non-Fatal Run-time Error | You cannot use a repeat value with the s and l format specifiers.
Simple/Array conflict with format specifier. | Non-Fatal Run-time Error | Array you passed to the function matches to a format specifier for a scalar, or a scalar you passed to the function matches to a format specifier for an array.
Specified width is too small to read the number. | Non-Fatal Run-time Error | Width you specified for a format specifier was not large enough to contain a complete number. Example: you specify a width of 2 for a float, and the number is .02 ; the negative sign and decimal point do not constitute a valid number.
Stack Overflow. | Fatal Run-time Error | Program exceeds the stack limit. Change the size of the stack in the Run Options dialog box, if you think that the code is executing correctly. Otherwise, ensure that the program does not contain any infinite recursion.
Subtraction involving invalid pointer. | Non-Fatal Run-time Error | One of the pointer expressions in the subtraction is invalid. It is probably the result of a previous invalid pointer operation.
Subtraction involving null pointer. | Non-Fatal Run-time Error | One of the pointer expressions in the subtraction has the value NULL. Both expressions in pointer subtractions must point into the same array object.
Subtraction involving uninitialized pointer. | Non-Fatal Run-time Error | One of the pointer expressions in the subtraction is invalid because you did not initialize it.
Subtraction of pointers to different objects. | Non-Fatal Run-time Error | Pointer expressions in the subtraction point to two distinct objects. Both expressions in pointer subtractions must point into the same array object.
Subtraction of pointers to freed memory. | Non-Fatal Run-time Error | One of the pointer expressions in the subtraction is invalid because it refers to a location in dynamic memory that you deallocated with the function free. Once memory is free, all pointers into that block of memory are invalid.
The callback function, NAME, differs only by a leading underscore from another function or variable. Change one of the names for proper linking. | Non-Fatal Run-time Error | When trying to match a callback name you specified in a .uir file to the callback function, the compiler found two symbols that are the same except for a leading underscore. Resolve this ambiguity by changing one of the names.
The callback function, NAME, specified in the UIR file, does not have required prototype. | Non-Fatal Run-time Error | You specified the NAME function as a callback function for an item in a user interface resource file, but it does not have the correct type to be a callback function. Callback functions must have one of the callback types specified in the user interface library header. The function will not be called.
The callback function, NAME, specified in the UIR file, is not a known function. | Non-Fatal Run-time Error | You specified the NAME function as a callback function for an item in a user interface resource file, but the function does not exist.
Too many arguments to variable argument function. | Non-Fatal Run-time Error | You passed more arguments to the variable argument function than it expected. The extra arguments do not affect the function call in any way.
Too many parameters. | Non-Fatal Run-time Error | Number of parameters you passed to a function exceed the number of parameters the format string expects.
Unexpected end of format string. | Non-Fatal Run-time Error | Format string you passed to the function is not complete. It is missing a source or destination format specifier, or contains an incomplete format specifier.
Uninitialized pointer argument to library function. | Fatal Run-time Error | Pointer expression you passed to the library function is invalid because you did not initialize it. It is either a local variable or an object in dynamic memory that you did not initialize.
Uninitialized pointer. | Non-Fatal Run-time Error | You never assigned a value to the pointer argument you passed to a function.
Uninitialized string. | Non-Fatal Run-time Error | You never assigned a value to the pointer argument you passed to the library function, or it is NULL.
Unknown modifier. | Non-Fatal Run-time Error | One of the modifiers in a format specifier is not valid.
Unknown specifier. | Non-Fatal Run-time Error | Specifier in the format specifier is not valid.
Value parameter expected. | Non-Fatal Run-time Error | You passed a pointer for a format specifier that requires a scalar value.
VXI address must be a multiple of 2 for word transfer. | Fatal Run-time Error | You attempted to perform VXI word transfer beginning at an odd address.
VXI address must be a multiple of 4 for longword transfer. | Fatal Run-time Error | You attempted to perform a VXI longword transfer beginning at an address that is not a multiple of 4.
w modifier not valid with lformat specifier. | Non-Fatal Run-time Error | You cannot use the w modifier with the lformat specifier.
z modifier only valid if rep is present. | Non-Fatal Run-time Error | z modifier cannot be used if the format specifier is not for an array.
z modifier required to match string parameter. | Non-Fatal Run-time Error | If you want to treat a character string as an array of another type, you must use the z modifier. This error also can occur if the order of the arguments is incorrect, or if an argument is missing.