-
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
[netcore3] XamlToRtfWriter.WriteShapeImage fails on unseekable streams #858
Comments
Ok, I don't believe the fundamental issue here is that these streams are unseekable, rather it seems that WPF manually closes this stream in the
Then we later try to read from the stream and it is disposed at that point |
Ahh considering the remarks in MemoryStream since the stream used to behave like a |
In PresentationFramework (XamlToRtfWriter.cs), the 'WriteShapeImage' function fails to due change in seekability of the zip streams returned in Read mode. The function reads from the same stream twice. This becomes a problem because after the first read, the stream becomes disposed, which causes an exception to be thrown when trying to set the position of the stream back to 0 in order to read the stream again.
Github issue #585 is related to the root cause
Steps to reproduce:
System.ObjectDisposedException: 'A stream from ZipArchiveEntry has been disposed.
Object name: 'System.IO.Compression.SubReadStream'.'
The text was updated successfully, but these errors were encountered: