Error Statement:
C interpreter run time error: Action.c (<script line number>) : Error — memory violation : Exception ACCESS_VIOLATION received
Reason:
While running the script, when a load generator tries to access a piece of memory that either doesn’t exist or accesses memory in the wrong way, then LoadRunner throws this error.
Possible Causes:
- Unclosed file in file handling logic
- Attempt to write a string literal
- Access memory allocated via the web_set_max_html_param_len() function
- Using the “Run as a Process” thread execution mode
Troubleshooting:
- Use fclose() to close the open files
- In Vuser scripts, string literals are read-only. Any attempt to write to a string literal generates an access violation, so avoid this situation.
- Set ‘web_set_max_html_param_len(xxxxx);’ appropriately. If it has a large number to capture the maximum data using web_reg_save_param(), then try to calculate the maximum length of the strings per page and add around 30% to it.
- Use “Run as a Thread” mode until and unless “Run as a Process” is required.
You may be interested: