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
{{ message }}
Repository navigation
Central and local directory mismatch for file? #399
We have seen a handful of cases where a ZIP created using FastZIP is corrupt. If you try to open it in WinZip, apparently the ZIP file header is readable, but extracting at least some files fails like this:
And running ZipFile.TestArchive(true) on such a file will return false.
I am looking for advice on how to track down this problem. Would be glad to provide any other relevant details that might help.
We have no other processes except FastZip calls to read/write the ZIP file contents. So I highly doubt anything secondary is corrupting the file.
It would seem as if the file changes content between being added as an entry and its content actually being written to the zip stream. If it only happens sporadically it might be due to buffer sizes and flushing.
@piksel I'm afraid I do not have the original header.json file that it was attempting to compress. This zipping operation is done by an app which manages the uncompressed source files in a temp folder so they were not preserved.
Also, in #398 (comment) it was mentioned that this issue is a variant of #398. If that is definitely the case, would downgrading to version 1.1 be a valid workaround until the issue is permanently fixed?
That should probably suffice. I will take a look. If it is the same problem then that would indeed fix it, but I'm not so sure that it is. They seem to touch the same areas, but I don't see how this could be caused by the same bug.
The only issue I can see in the report is that the CRC for one file is different in the two headers. But without any clear way to reproduce this I'm going to close it. Hopefully it will be fixed in v1.3, but since we can't test it... 🤷♀️
Activity
piksel commentedon Dec 30, 2019
What is the real CRC32 of the file being compressed?
You can use this python snippet to show the CRC of the file:
It would seem as if the file changes content between being added as an entry and its content actually being written to the zip stream. If it only happens sporadically it might be due to buffer sizes and flushing.
piksel commentedon Dec 30, 2019
Also, could you provide the output of
Or you can attach a bad file to this issue by dragging it to the comment textbox.
DavidHollman commentedon Jan 9, 2020
@piksel I'm afraid I do not have the original header.json file that it was attempting to compress. This zipping operation is done by an app which manages the uncompressed source files in a temp folder so they were not preserved.
I've attached the output of the unzip command.
unzip.txt
Alpha-108-Test-Project.zip
I've also attached the ZIP file with the problem.
Thanks for your help looking into this.
DavidHollman commentedon Jan 9, 2020
Also, in #398 (comment) it was mentioned that this issue is a variant of #398. If that is definitely the case, would downgrading to version 1.1 be a valid workaround until the issue is permanently fixed?
piksel commentedon Jan 10, 2020
That should probably suffice. I will take a look. If it is the same problem then that would indeed fix it, but I'm not so sure that it is. They seem to touch the same areas, but I don't see how this could be caused by the same bug.
DavidHollman commentedon Jan 15, 2020
Thanks. I'll try 1.1 though since I can't reproduce this at will it will be hard to know if that definitely has avoided the issue.
piksel commentedon Aug 4, 2020
The only issue I can see in the report is that the CRC for one file is different in the two headers. But without any clear way to reproduce this I'm going to close it. Hopefully it will be fixed in v1.3, but since we can't test it... 🤷♀️