Home Forums .NET libraries Xceed Zip & Real-Time Zip for .NET Corrupt Zip file throws uncatchable exception

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #19350 |

    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

    Imported from legacy forums. Posted by bvalle (had 5174 views)

    User (Old forums)
    Member
    Post count: 23064

    Hello Bruno.

    Well I guess you found a bug! When an exception occurs in a ZippedFolder ctor (or its derived class ZipArchive), it causes a NullReferenceException in the Finalizer. I have filed this bug and it should be fixed within two weeks. In case you want to follow up with <mail>support@xceedsoft.com</mail>, simply include “case 74084” in the email title.

    Imported from legacy forums. Posted by Martin (had 367 views)

    User (Old forums)
    Member
    Post count: 23064

    Thank you for your prompt reply 🙂

    Imported from legacy forums. Posted by bvalle (had 393 views)

    User (Old forums)
    Member
    Post count: 23064

    Hello

    I got the following response from support about 2 weeks ago:

    “Hi,

    The new patch packages which will include your fix should be available this Friday. Please go to the Update Center : http://www.xceedsoft.com/redirect/updates/ then to receive your fix.

    Best regards,”

    I checked the latest version of the API for Zip for .Net Compact Framework, but it seems to be still on version 2.0.116.0. I tested it out on my application and I am still getting the same “An unhandled exception of type ‘System.ArgumentNullException’ occurred in Xceed.Zip.dll”

    Am I doing something that is not right? I have already sent 2 e-mails to support and got no answer back. Are you guys working on this? If you are it is ok, but please just let me know.

    Thank you,
    Bruno Valle

    Imported from legacy forums. Posted by bvalle (had 515 views)

    User (Old forums)
    Member
    Post count: 23064

    Indeed this was a mistake on our end. You can expect to receive the .dll shortly.

    Cheers !

    Imported from legacy forums. Posted by Matt (had 660 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi there

    No problems, we are all humans after all 🙂

    Just one question, not trying to be a pain or anything, but what do you mean by “shortly”? One week? Two weeks?

    Thank you,
    BrunoV

    Imported from legacy forums. Posted by bvalle (had 5654 views)

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.