You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Trying to read a very large file that is not correctly formatted as CSV may result in an out of memory exception when calling Read().
To Reproduce
// create a large file using cmd.exe// fsutil file createnew 1gb.tst 1073741824conststringfilePath=@"C:\1gb.tst";try{using(varstream=File.OpenRead(filePath)){using(varcsvReader=newCsvReader(newStreamReader(stream),CultureInfo.InvariantCulture)){csvReader.Read();}}}catch(CsvHelperException){// pass}catch(OutOfMemoryException){// fail}
Expected behavior
CsvHelper does not use an excessive amount of memory and a more appropriate exception such as BadDataException is thrown.
The text was updated successfully, but these errors were encountered:
Describe the bug
Trying to read a very large file that is not correctly formatted as CSV may result in an out of memory exception when calling Read().
To Reproduce
Expected behavior
CsvHelper does not use an excessive amount of memory and a more appropriate exception such as BadDataException is thrown.
The text was updated successfully, but these errors were encountered: