SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Wrong Local header signature: 0x0

Last post 09-24-2011 12:12 AM by DavidPierson. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 11-18-2010 6:48 PM

    Wrong Local header signature: 0x0

    Hi,

    I get the following error when attempting to extract a file out of a zip (which was created with the Sharpzip library):

    ICSharpCode.SharpZipLib.Zip.ZipException: Wrong Local header signature: 0x0  at ICSharpCode.SharpZipLib.Zip.ZipInputStream.GetNextEntry()

    I am currently using version 0.85.4.369

    Any help is appreciated. Thanks.

  • 11-19-2010 12:13 AM In reply to

    Re: Wrong Local header signature: 0x0

    Hi,

    There were some cases of this exception being raised some years back, but they have been solved and there are no known issues in this area that I am aware of, anyway.

    Before trying anything else, upgrade to version 0.86.0 for both the creation and extraction - this does fix some important bugs. Here is the link. Also check the changelog.

    If you still get the problem in 0.86.0, can you please post the code to create and extract.

    Thank you
    David

     

  • 11-19-2010 6:26 AM In reply to

    Re: Wrong Local header signature: 0x0

    Thank you David; I will do that. But is there any way to recover from zips that have already been generated that are throwing this exception? I can get you a couple of these zip files if that might help.

    Thanks.


    Bal

  • 11-19-2010 7:11 AM In reply to

    Re: Wrong Local header signature: 0x0

    I've sent you an email via the forum with an address you can forward them to.

  • 09-22-2011 10:20 PM In reply to

    Re: Wrong Local header signature: 0x0

     Did this solve your problem? I'm getting the same error and I'm using 0.85.5.452. I suspect that the file may not be totally copied when I try to unzip it, but I also believe that that would cause a File in use exception rather than this message...

    Alejandro.

     

  • 09-23-2011 12:14 AM In reply to

    Re: Wrong Local header signature: 0x0

    Possibly, but depending on the way the writer of the file sets the share permissions you may be able to read while he's still writing it.

    From memory, when the OP sent me some samples, his zips contained nothing but null characters - e.g. the 0x0 in the local header signature message. Do you get 0x0 also or some other byte value? Open your zip in a hex editor, they should all start with PK34 ...

    There's no reason not to upgrade to 0.86.0 and lots of reasons to do so, check the changelog. I'm a bit puzzled why you are getting this issue now, when you must have been running this for some time to be using 0.85 ...

    Let us know
    David

  • 09-23-2011 12:43 PM In reply to

    Re: Wrong Local header signature: 0x0

      What we are doing is setting a process to read xlsx files, which are in essence zipped xml files. The process runs continuously and the file is about 1.5MB. I think it may be trying to read the file before it's fully copied, but I'm not sure about that.

      The error says 0x0, at ICSharpCode.SharpZipLib.Zip.ZipInputStream.GetNextEntry(). I'll check the file with the hex editor but I don't think that's our problem.

      Thanks for your quick reply!

  • 09-24-2011 12:12 AM In reply to

    Re: Wrong Local header signature: 0x0

    There was a post the other day about xlsx, which is here ...

    http://community.sharpdevelop.net/forums/t/13738.aspx

    and I was able to unpack and pack xlsx with no problem, so I would say you've hit the problem on the head. Good luck, let us know how it goes!

    Regards,
    David

Page 1 of 1 (8 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.