LoadRunner error — memory violation: exception access_ Solution

Recently, I was doing the performance test of file download. I used LoadRunner tool to report “error: C interpreter run time error: action. C (1613): error – memory violation: exception access” after running for several times_ VIOLATION received.”。 After careful review of the script and scenario analysis, it is found that: in the fopen method of the script, the file operation mode is “W +”, and Encyclopedia:
W + reads and writes in plain text mode, while WB + reads and writes in binary mode.
W + open the read-write file. If the file exists, the length of the file will be zero, that is, the content of the file will disappear. If the file does not exist, the file is created.
Open or create a new binary file in WB write only mode, and only write data is allowed.
WB + read/write mode opens or creates a binary file that allows reading and writing.
The image file I downloaded belongs to binary file,
all the files that must be read and written with WB +, namely fopen (file, “WB +”);
test again, and the error will no longer appear.
Note: if you are using plain text files, you can use w +, if you are downloading binary files, you must use WB mode.

Read More: