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.
When using a GZipStream as shown in the attachment, calling Close() on the stream raises an ObjectDisposedException. It looks like it's disposing the underlying FileStream and then attempting to write some data to the disposed stream.
Created attachment 4647 [details]
I should have mentioned that I'm running Mono compiled from Git on Xubuntu 12.04.
Looks like DeflateStream.Dispose is closing the base stream and then calling DeflateStreamNative.Dispose, which eventually calls a Write operation on the closed base stream. My workaround for now is to construct the GZipStream using the three-parameter constructor, passing "true" as the last parameter to leave the base stream open. Then close the GZipStream and then close the base stream manually. I'm not exactly sure what the proper fix is though.
Fixed in master