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
Call ZipFile.TestArchive when the application is under severe memory pressure.
Expected behavior
An OutOfMemoryException is thrown by the runtime and leaks out of SharpZipLib.
Actual behavior
SharpZipLib swallows the OutOfMemoryException and TestArchive returns false, leading people to believe that there is a problem with the ZIP file, rather than the runtime.
leading people to believe that there is a problem with the ZIP file, rather than the runtime.
Well, the error that's reported will still contain the cause: Exception during test: Out of memory.
Even though it might make sense to let environmental exceptions through, it might still be much more surprising for consumers that the TestArchive method would throw.
Saying that the archive could not be verified due to not having enough memory feels like the most generic way to handle it.
Perhaps it could be added to the test scenario as a flag?
Steps to reproduce
Call ZipFile.TestArchive when the application is under severe memory pressure.
Expected behavior
An
OutOfMemoryException
is thrown by the runtime and leaks out of SharpZipLib.Actual behavior
SharpZipLib swallows the OutOfMemoryException and TestArchive returns
false
, leading people to believe that there is a problem with the ZIP file, rather than the runtime.Version of SharpZipLib
v1.3.3.
Obtained from (only keep the relevant lines)
Package installed using NuGet
Repro case:
The text was updated successfully, but these errors were encountered: