C interpreter run time error: Action.c (<script line number>) : Error — memory violation : Exception ACCESS_VIOLATION received
While running the script, when a load generator tries to access a piece of memory that either doesn’t exist or access memory in the wrong way, then LoadRunner throws this error.
- Unclosed file in file handling logic
- Attempt to write a string literal
- Access memory allocated via web_set_max_html_param_len() function
- Using “Run as a Process” thread execution mode
- 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 large number to capture the maximum data using web_reg_save_param() then try to calculate the max 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 not required.