-
Notifications
You must be signed in to change notification settings - Fork 985
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
Regression 1.3.3 => 1.4.0: Deadlock when using TarInputStream.GetNextEntry() in WPF application #786
Comments
It happens when I wrap the See this small reproduction sample: https://github.com/flensrocker/SharpZipLibDeadLock When I downgrade SharpZipLib to 1.3.3 it won't lock. |
Thanks for a thorough report! I will investigate this further... |
I took a look at I will think about it from time to time and will report any progress if I come up with something. |
Adding After all it's a "best practice" for general purpose libraries, see https://devblogs.microsoft.com/dotnet/configureawait-faq/ |
Steps to reproduce
This is part of a large WPF application (.NET Framework 4.8), I have to build a small reproduction. I just want to mention this issue in case someone has the same problem.
Expected behavior
TarInputStream.GetNextEntry()
should not deadlock when used on the main thread.Actual behavior
TarInputStream.GetNextEntry()
blocks when called on the main thread of an WPF application. In the PR #746 for the async streams I see a lot of.GetAwaiter().GetResult()
. This is not a recommended practice, see https://github.com/davidfowl/AspNetCoreDiagnosticScenarios/blob/master/AsyncGuidance.md#warning-deadlocksVersion of SharpZipLib
1.4.0
Obtained from (only keep the relevant lines)
The text was updated successfully, but these errors were encountered: