Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Attempting to create a zip archive results in "SharpCompress.Common.ArchiveException" "Failed to locate the Zip Header".
I made a minimum working issue: http://paste.ubuntu.com/11995302/
This will crash on line 37 if ran under Mono.
The method when run under normal .Net on windows.
Tested with Mono 18.104.22.1683 nightly build for Mac and Mono 4.0.2 stable for Mac.
Also tested with Mono from github on Linux 8/3/2015.
Exception doesn't happen if ZipArchiveMode is set to Create instead of Update.
A simple fix for this issue may be change ZipArchive's Open() method to test to see if the size of the archive file (or stream) is of length 0 before attempting to read the archive directory or other content.
Due to some other issues with Xamarin's implementation of ZipArchive, I've written a replacement that keeps the same API as ZipArchive, but is based on ZipStorer. My implementation of ZipArchive.Open() does this and works fine.
Is there any update on when this issue might be addressed?
Pull request up at https://github.com/mono/mono/pull/2033.
Will backport this to 4.2 and 4.0 once its merged.
Also please also report the other issues you've faced so we can get them fixed.