-
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
Disposing page stream eagerly #7568
Conversation
@bgrainger - This may also fix #6842 (since the top call stacks look similar) |
I don't think it will, because my call stack didn't go through I wonder if there's a lower-level place to fix this that can address #6842, #7567, #3206 (and maybe others?) all at once. |
The risk of regression is that you will dispose a stream that is not yours and that someone else expects to reuse. For example cached site of origin streams could be worth checking. |
Without the @miloush - Please let me know if I have missed anything. |
@pchaurasia14 yes but where does the wpf/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/AppModel/SiteOfOriginPart.cs Lines 105 to 121 in e9ea2a3
So you would have to ask for content type, dispose the stream and then ask for the stream again with new search. However, I don't see how that could possibly happen, because the cached stream is not accessible without clearing the cache (and |
/backport to release/6.0 |
Started backporting to release/6.0: https://github.com/dotnet/wpf/actions/runs/4851890830 |
/backport to release/7.0 |
@pchaurasia14 an error occurred while backporting to release/6.0, please check the run log for details! Error: @pchaurasia14 is not a repo collaborator, backporting is not allowed. If you're a collaborator please make sure your dotnet team membership visibility is set to Public on https://github.com/orgs/dotnet/people?query=pchaurasia14 |
Started backporting to release/7.0: https://github.com/dotnet/wpf/actions/runs/4851892749 |
@pchaurasia14 an error occurred while backporting to release/7.0, please check the run log for details! Error: @pchaurasia14 is not a repo collaborator, backporting is not allowed. If you're a collaborator please make sure your dotnet team membership visibility is set to Public on https://github.com/orgs/dotnet/people?query=pchaurasia14 |
/backport to release/7.0 |
Started backporting to release/7.0: https://github.com/dotnet/wpf/actions/runs/4861072541 |
/backport to release/6.0 |
Started backporting to release/6.0: https://github.com/dotnet/wpf/actions/runs/4861082815 |
Fixes #7567
Description
Stream is not explicitly disposed when retrieving page contents. This causes stream to stay open even when the usage is over. The next iteration of the same code path then throws the error since it sees that the underlying stream is already open.
Customer Impact
Unable to search when using docviewer control
Regression
Don't know.
Testing
Under testing.
Risk
Low. Since the scope of the stream is anyways local.
Microsoft Reviewers: Open in CodeFlow