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:
- [Java] Java program error: exception_ ACCESS_ VIOLATION (0xc0000005)
- Unhandled exception: 0xc0000005: access violation while reading location 0x00000000
- Dxly solves the fatal error of AutoCAD2006: unhandled access violation reading 0x0000 exception at 6532b0h.
- C / C + + error handling (document): unhandled exception: 0xc0000005: access violation while reading location 0x00000000
- Unhandled exception at 0x00000000: 0xc0000005: access violation at position 0x0000000000
- Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and co
- Syntax error or access violation: 1071 specified key was too long; max key length is 767 bytes
- Error code 2: Access violation error.
- The difference, cause and solution of memory overflow and memory leak
- exception is java.lang.LinkageError: loader constraint violation: loader
- Memory error unhandled exception: 0xc0000005: read location: 0x00000
- The firmware of the connected j-link does not support the following memory access)
- PyTorch CUDA error: an illegal memory access was encountered
- Python: CUDA error: an illegal memory access was accounted for
- The solution of a Java exception has occurred. And error exception in thread when eclipse runs
- Running program encountered Error:Access violation at 0x**(tried to write to 0x**) program terminated
- com.qcloud.cos.exception.CosServiceException Access Denied
- There is an unhandled exception at: 0xc0000005: an access conflict occurred while reading location 0x00000000.
- Three possibilities of “unhandled exception: 0xc0000005: access conflict when reading location 0x00000000”
- RuntimeError: CUDA error: out of memory solution (valid for pro-test)