Closed Junjun-zhao closed 3 years ago
Tagging subscribers to this area: @dotnet/area-system-io-compression See info in area-owners.md if you want to be subscribed.
Author: | Junjun-zhao |
---|---|
Assignees: | jeffhandley |
Labels: | `area-System.IO.Compression` |
Milestone: | - |
@jeffhandley @adamsitnik @carlossanlop @jozkee @stephentoub We have 2 apps failed with this issue. Could you please help look into this issue and help assign if it is incorrect ? Thanks a lot~
That was https://github.com/dotnet/docs/issues/24649 introduced by https://github.com/dotnet/runtime/pull/53644
I've sent a fix to the library: https://github.com/GoldenCrystal/NetUnicodeInfo/pull/7
Since this was a breaking change introduced on purpose and for good reasons, can we close the issue?
cc @stephentoub
@adamsitnik Thanks a lot for checking this issue and quick fix for the library.
We had another app failed and is also related to System.IO.Compression.dll. Could you please help check whether they are same root cause? Thanks.
App: Countdown (.NET 5.0 App) GitHub Links: https://github.com/DHancock/Countdown
Test scenarios: Windows 10 RS5 X64 + 5.0.300 PASS Windows 10 RS5 X64 + 6.0.100-preview.6.21321.10: Fail
Findings:
It returns more data when read resource file with .net 5, we think there is incomplete read.
private void LoadResourceFile()
{
Stream resourceStream = typeof(App).Assembly.GetManifestResourceStream(cResourceName);
if (resourceStream != null)
{
using DeflateStream stream = new DeflateStream(resourceStream, CompressionMode.Decompress);
StreamManager sm = new StreamManager(stream);
byte[] line;
while ((line = sm.ReadLine()) != null)
{
int keyLength = line.Length;
// check for a word break within the line
if (keyLength > (cMinLetters * 2))
{
for (keyLength = cMinLetters; keyLength < line.Length; ++keyLength)
{
if (line[keyLength] == cWord_seperator)
break;
}
}
// make key
char[] c = GetChars(line, keyLength);
Array.Sort(c);
string key = new string(c);
// add to dictionary
if ((keyLength == cMaxLetters) && (keyLength == line.Length))
conundrumWords[key] = line;
else
otherWords[key] = line;
}
}
}
whether they are same root cause?
@stephentoub @Junjun-zhao how do we deal with this issue from here? Are we going to send a PR with a patch to https://github.com/DHancock/Countdown?
A new version of the NuGet package has been shipped to nuget.org: https://www.nuget.org/packages/UnicodeInformation/
@stephentoub @Junjun-zhao how do we deal with this issue from here? Are we going to send a PR with a patch to https://github.com/DHancock/Countdown?
We will create an issue and let owner know about breaking change. Thanks all.
Application Name: QuickInfo OS: Windows 10 RS5 CPU: X64 .NET Build Number: 6.0.100-preview.6.21321.10
Verify Scenarios: 1) Windows 10 RS5 X64 + dotnet-sdk-3.1.411 PASS 2) Windows 10 RS5 X64 + 6.0.100-preview.6.21315.23 PASS 3) Windows 10 RS5 X64 + 6.0.100-preview.6.21321.10: Fail
Github Link : https://github.com/KirillOsenkov/QuickInfo Source Code & App check at : https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1345781
Minimal Repro steps:
This is 3.1 app, but we are running it on 6.0, machine only have 6.0 installed, and DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX=2, so it runs on 6.0
1)Copy App to machine 2) dotnet QuickInfoWeb.dll 3) Navigate to https://localhost:5001/ 4) In the textbox, type color
Expected Result: It should display colors
Actual Result:
Findings :
We think error is related to System.IO.Compression.dll, when we replace it with working version, app works fine.
For minimal app repro :
Error is coming from nuget this package :
Library source code : GitHub - GoldenCrystal/NetUnicodeInfo: Unicode Character Inspector & Library providing a subset of the Unicode data for .NET clients.
This code will work on .net5 but throws exception on .net6 1) create console app (net5 or net6), but we need to run it on net6 2) Add this package :
<PackageReference Include="UnicodeInformation" Version="2.5.0" />
3) Add this code in program.cs :Exception :
@dotnet-actwx-bot @dotnet/compat