Home > User Support > CoverageMaster winAMS FAQ

CoverageMaster winAMS FAQ

MPU Simulator

452_03: The error "The test data entered exceeds the size of the character string or array" is displayed during the simulation. How do I fix it?

Question:

In CoverageMaster I press the "Start Simulator" button to run a test, but a "The test data entered exceeds the size of the character string or array" error is displayed. I am using an array but have not set test data that exceeds the array's size. What is the cause of this?


Answer:

This error can happen when an array of char (or unsigned char) is specified with the "Number / Character" setting as an output variable for the test function. By default, an output variable whose type is an array of char (or unsigned char) is treated as a string. As such, it is expected to end with the NULL terminator character (0). If no NULL character is found within the boundary of the space allocated for the array, the next address outside of the allocated memory is overwritten and the error occurs.

To solve this problem, two solutions are available:

1. In the "Test Settings" screen, click the "Advanced..." button in the "Other Settings" area (bottom right). From the "Advanced Settings" window, under "Display settings when expected values are not entered" for "Char type number string" select "Number string" then click the "OK" button. This tells the program to treat char arrays like numeric arrays instead of strings.

2. In the column for the array in the test CSV file, enter "|*" as the expected value. This tells the program to output the variable as a numeric array.

 

Related Technical Tips Search

Other technical tips in GAIO's web site can be searched for using the links below.

Search key word link: string | array
Technical Tips Google Search


Information Links