Hi
I am running the Xceed Zip for .NET Compact Framework 2.0 version v2.0.116.0. I am a C++ programmer trying to get into the C# realm, so please bare with me if this is a simple fix that I am just not seeing.
I was running my application when I found if I create an invalid Zip file, by just renaming a dll or another file type to a .zip, when I try to open this “invalid file” I get the following exception when the ZipArchive object is trying to reference to this invalid file:
An unhandled exception of type 'Xceed.Zip.InvalidZipStructureException' occurred in Xceed.Zip.dll
Additional information: The zip end header signature could not be found in the zip file.
I thought I could fix this by putting a simple try and catch around the ZipArchive, and in fact it did prevent the application from crashing a burning, but unfortunately now the OS throws an exception when I get out of my application:
An unhandled exception of type 'System.ArgumentNullException' occurred in Xceed.Zip.dll
On my try and catch statement I was not able to find a way to destroy the ZipArchive object. I was under the assumption garbage collection would take care of it once the object got out of scope.
Please understand that your sample file “MiniExplorer” behaves the same way. If I try to open an “invalid zip file” it will crash and burn, and if I put the try and catch it will throw the same exception after it is closed.
Could you please help me? If there is a way to destroy the ZipArchive object or another way to catch this exception that the application throws after it is done.
Please let me know.
Thank you,
BrunoV