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

Branch Tree Panel initially empty #5326

Closed
mstv opened this issue Aug 19, 2018 · 2 comments · Fixed by #5358
Closed

Branch Tree Panel initially empty #5326

mstv opened this issue Aug 19, 2018 · 2 comments · Fixed by #5358
Labels
area: left-panel Issues related to the Left Panel area: user experience type: regression regression, normally to latest official release
Milestone

Comments

@mstv
Copy link
Member

mstv commented Aug 19, 2018

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

What is the current behavior?
The Branch Tree Panel is empty when it is shown the first time.
grafik

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Show the Branch Tree Panel, close and open GE.
Or hide the Branch Tree Panel, close and open GE, show the Branch Tree Panel.

What is the expected behavior?
The branches are shown and if it applies, an indicator that loading is still progress.

Environment you encounter the issue:

  • GitExtensions version: master
  • GIT version: 2.17.1.w.2-x64
  • OS version: Windows 7
  • .NET version: 4.7

Did this work in previous version of GitExtensions (which)?
don't know

@RussKie RussKie added this to the 3.00 milestone Aug 20, 2018
@RussKie RussKie added type: regression regression, normally to latest official release area: user experience labels Aug 20, 2018
@RussKie RussKie added the area: left-panel Issues related to the Left Panel label Aug 27, 2018
@RussKie
Copy link
Member

RussKie commented Aug 27, 2018

While trying to open the panel the following exceptions are thrown:

Exception thrown: 'System.OperationCanceledException' in mscorlib.dll
Exception thrown: 'System.OperationCanceledException' in mscorlib.dll
Exception thrown: 'System.OperationCanceledException' in mscorlib.dll
Exception thrown: 'System.OperationCanceledException' in mscorlib.dll
Exception thrown: 'System.OperationCanceledException' in mscorlib.dll

The debugger halts at:
image

@RussKie
Copy link
Member

RussKie commented Aug 27, 2018

This looks like an out-of-order execution.
We obtain a cancellation token on line:156, then, while getting the selected branch, cancel the token...
image

RussKie added a commit to RussKie/gitextensions that referenced this issue Aug 27, 2018
Whenever the left panel is opened for the first time it would remain
empty until refreshed. It appears the loading sequence would be cancelled
due to an incorrect order of events.
Whenever the left panel is refreshed a new cancellation token is obrained.
Few lines later, while attempting to determine the current local branch
a new cancellation token would be provisioned cancelling previously the issued
one.

The fix reorders the sequence, getting the local branch before obtaining a cancellation
token for the left panel data loading.

Fixes gitextensions#5326
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: left-panel Issues related to the Left Panel area: user experience type: regression regression, normally to latest official release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants