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.
Alan, another bug for you, could you comment and apply to mono-2-10 and master?
I wrote some unit tests to cover these changes and it turns out that if you give the package API a stream, it does not close it no matter what type of stream it is. It only closes streams which it creates itself.
I also added a test for closing the same package twice. I'll commit a modified version of your patch soon which will cope with the behaviour the new tests uncovered. Thanks for the report and the patch. It was useful to see possible fixes as well as the description :)
I have two tests covering the issue, one does a double close and also a double dispose. The second test ensures that Dispose is not called on the stream if you pass it to the Package constructor. So both this scenarios are covered by tests now. The fix will be in the next release of our products though if you wish to test beforehand I should hopefully be able to provide you with a package to test with. If you do wish to test, let me know what operating system/product you have. i.e. are you using Mono on Windows or perhaps MonoTouch on MacOS.
Fixed in git master and the 2-10 branch. You can test the fixes by following the instructions here for building from git: http://www.mono-project.com/Compiling_Mono_From_Git
Do let me know if you come across any other issues. Patches are definitely always welcome too!