-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fixing DrtXpsApi failures #1301
Conversation
} | ||
} | ||
|
||
// Licensed to the .NET Foundation under one or more agreements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
weird, viewing the diff in VS looks normal, not sure why this looks like the whole doc changed? maybe line-endings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the actual change to look at?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a corresponding change needed in dotnet-wpf-test ? |
src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsFixedDocumentReaderWriter.cs
Outdated
Show resolved
Hide resolved
lgtm |
...icrosoft.DotNet.Wpf/src/WindowsBase/MS/Internal/IO/Packaging/XmlDigitalSignatureProcessor.cs
Show resolved
Hide resolved
/// <summary> | ||
/// This method closes streams and frees memory for this | ||
/// fixed document. | ||
/// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While we're swapping to usings, maybe we should add one for the stream and writer here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea.
Yeah, see this commit here: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good to me.
Can you just be sure the line endings in XpsFixedDocumentReaderWriter.cs are correct? If you turn off ignore whitespace in VS that lights up just like GitHub, so you have a line ending transformation there.
Ahh yeah ok i think i remember now. The line endings were LF, but when i went to stage the file with
so i had to change the line endings to CRLF |
Fixes failures in DrtXpsApi as outlined in #1054
The implementation in CoreFx is more strict on ensuring that callers properly close streams before they are re-opened in update mode. this prevents multiple different streams from being updated at the same time since it uncompresses the data and stores it in memory
The callstacks we get is this:
Here is the code that throws the exception in CoreFx:
https://github.com/dotnet/corefx/blob/master/src/System.IO.Compression/src/System/IO/Compression/ZipArchiveEntry.cs#L697