Skip to content

Regression 1.3.3 => 1.4.0: Deadlock when using TarInputStream.GetNextEntry() in WPF application #786

@flensrocker

Description

@flensrocker

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-deadlocks

Version of SharpZipLib

1.4.0

Obtained from (only keep the relevant lines)

  • Package installed using NuGet

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions