LoadRunner Error "Too many local variablesaction.c" workaround

Source: Internet
Author: User

The problem description, when defining an array in action.c if the array length is too long, such as Char a[1024*1024], will be an error when running :

It means too many local variables.

The problem causes and solutions are as follows:

1. Vugen The maximum memory that can be allocated for local variables is 64K, if you want to allocate more than 64K variables, you need to use the following method:

A. Define it as a global variable, Declare it globally.

Char buffer[100000]; Actions () {   

B. Use malloc () to allocate memory, using malloc () to allocate.

2. If the replay times error after recording the script, you can configure it as follows:

If problem replaying a large database script in LoadRunner 7.8 or above, immediately after recording.

A. Go to Tools-Regenerate vusers ...

B. Click on ' Options ... ' to edit the recording options

C. Under General:

1. Script section, enable the option for "Split action sections to functions by event". By default, the is not enabled and it has a value of "500". This option is useful-the action section is rather large

2. Script and select "Maximum number of lines in action file", change the value to 30000 and regenerate again

Issue: Run the pin this report "Too many local Variablese" error

Workaround:

Script split Recording

This error indicates that the number of variables in the action code exceeds the specified range. It is generally not as if there are more than 50.

LoadRunner Error "Too many local variablesaction.c" workaround

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.