-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot access a closed stream #24
Comments
Only changed that one thing in v5.4.2 so I think it's caused by a change in War3Net.IO.Mpq, War3Net.Build.Core v5.4.1 depended on War3Net.IO.Mpq v5.4.0, but latest version is v5.4.3 |
Yep, no problem. |
The issue was in War3Net.Build.Core after all, only occured since War3Net.IO.Mpq v5.4.3 because reading from the mpqstream for mpq files with SingleUnit flag (which includes files which are based on (in this case) a memorystream instead of an mpq archive) was made lazy so it happens on first read instead of in the ctor. At that point the base memorystream was already disposed. |
Awesome, I can compile again. Cheers. FYI I had to add War3Net.Build.Core 5.4.3 to my package references manually - the implicit reference from War3Net.Build 5.4.2 didn't seem to cut it. |
Hi, getting this error when I try to build my map.
Unhandled exception. System.ObjectDisposedException: Cannot access a closed Stream. at System.IO.MemoryStream.Seek(Int64 offset, SeekOrigin loc) at War3Net.IO.Mpq.MpqStream.LoadSingleUnit() at War3Net.IO.Mpq.MpqStream.BufferData() at War3Net.IO.Mpq.MpqStream.ReadInternal(Byte[] buffer, Int32 offset, Int32 count) at System.IO.BinaryReader.InternalRead(Int32 numBytes) at System.IO.BinaryReader.ReadInt32() at War3Net.Build.Info.MapInfo.ReadFrom(BinaryReader reader) at War3Net.Build.Info.MapInfo..ctor(BinaryReader reader) at War3Net.Build.Extensions.BinaryReaderExtensions.ReadMapInfo(BinaryReader reader) at War3Net.Build.Extensions.MpqArchiveBuilderExtensions.SaveWithPreArchiveData(MpqArchiveBuilder mpqArchiveBuilder, String fileName, MpqArchiveCreateOptions createOptions) at War3Net.Build.MapBuilder.Build(String path, MpqArchiveCreateOptions createOptions) at AzerothWarsCSharp.Launcher.Program.Build(String baseMapPath, String projectFolderPath, Boolean launch) in C:\Users\Zak\source\repos\AzerothWarsCSharpNew\src\AzerothWarsCSharp.Launcher\Program.cs:line 146 at AzerothWarsCSharp.Launcher.Program.MakeDecision() in C:\Users\Zak\source\repos\AzerothWarsCSharpNew\src\AzerothWarsCSharp.Launcher\Program.cs:line 83 at AzerothWarsCSharp.Launcher.Program.Main() in C:\Users\Zak\source\repos\AzerothWarsCSharpNew\src\AzerothWarsCSharp.Launcher\Program.cs:line 59
This issue is new as of 5.4.2. If I downgrade to 5.4.1 the problem goes away.
The text was updated successfully, but these errors were encountered: