Skip to content
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

UI freeze in 3.0 RC2 while retrieving avatars #5859

Closed
lanfeust69 opened this issue Dec 6, 2018 · 0 comments
Closed

UI freeze in 3.0 RC2 while retrieving avatars #5859

lanfeust69 opened this issue Dec 6, 2018 · 0 comments

Comments

@lanfeust69
Copy link
Contributor

lanfeust69 commented Dec 6, 2018

Do you want to request a feature or report a bug?
a bug

What is the current behavior?
When opening a repo, the UI may freeze forever, possibly with a high CPU usage

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

  • Empty the Image cache %APPDATA%\GitExtensions\GitExtensions\Images
  • Open a repo with many contributors

Explanation
Contrary to the documentation, WebClient.OpenReadTaskAsync() can block synchronously due to this line. This can induce a deadlock (possibly an active one, where two threads play ping-pong) if called from the UI thread, as the AvatarColumnProvider does through the AvatarDownloader. Note that this can't happen for avatars cached in %APPDATA%\GitExtensions\GitExtensions\Images.
Possible workaround in PR to follow...

Environment you encounter the issue:

  • GitExtensions version: 3.00 RC2
  • GIT version: N/A
  • OS version: Windows 10 version 1709 build 16299.726
  • .NET version: 4.7.2
lanfeust69 added a commit to lanfeust69/gitextensions that referenced this issue Dec 8, 2018
lanfeust69 added a commit to lanfeust69/gitextensions that referenced this issue Dec 8, 2018
drewnoakes added a commit to drewnoakes/gitextensions that referenced this issue Dec 10, 2018
This method can block synchronously. This change moves calls to the
thread pool, and limits the number of concurrent downloads to prevent
thread pool exhaustion.

Fixes gitextensions#5859.

Follows and replaces gitextensions#5868.
@ghost ghost assigned drewnoakes Dec 10, 2018
drewnoakes added a commit to drewnoakes/gitextensions that referenced this issue Dec 12, 2018
This method can block synchronously. This change moves calls to the
thread pool, and limits the number of concurrent downloads to prevent
thread pool exhaustion.

Fixes gitextensions#5859.

Follows and replaces gitextensions#5868.
@ghost ghost removed the status: ready label Dec 13, 2018
@RussKie RussKie added this to the 3.0.1 milestone Dec 13, 2018
RussKie pushed a commit that referenced this issue Dec 21, 2018
This method can block synchronously. This change moves calls to the
thread pool, and limits the number of concurrent downloads to prevent
thread pool exhaustion.

Fixes #5859.

Follows and replaces #5868.

(cherry picked from commit 2a6511f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants