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

GetSubmoduleStatusAsync CancellationTokenSource Disposed #3278

Closed
jbialobr opened this issue Jul 23, 2016 · 3 comments
Closed

GetSubmoduleStatusAsync CancellationTokenSource Disposed #3278

jbialobr opened this issue Jul 23, 2016 · 3 comments

Comments

@jbialobr
Copy link
Member

jbialobr commented Jul 23, 2016

System.ObjectDisposedException was unhandled by user code
  HResult=-2146232798
  Message=Obiekt CancellationTokenSource związany z tym tokenem CancellationToken został usunięty.
  Source=mscorlib
  ObjectName=""
  StackTrace:
       w System.Threading.CancellationToken.ThrowObjectDisposedException()
       w System.Threading.Tasks.Task.AssignCancellationToken(CancellationToken cancellationToken, Task antecedent, TaskContinuation continuation)
       w System.Threading.Tasks.Task.TaskConstructorCore(Object action, Object state, CancellationToken cancellationToken, TaskCreationOptions creationOptions, InternalTaskOptions internalOptions, TaskScheduler scheduler)
       w System.Threading.Tasks.Task..ctor(Delegate action, Object state, Task parent, CancellationToken cancellationToken, TaskCreationOptions creationOptions, InternalTaskOptions internalOptions, TaskScheduler scheduler)
       w System.Threading.Tasks.Task.InternalStartNew(Task creatingTask, Delegate action, Object state, CancellationToken cancellationToken, TaskScheduler scheduler, TaskCreationOptions options, InternalTaskOptions internalOptions, StackCrawlMark& stackMark)
       w System.Threading.Tasks.TaskFactory.StartNew(Action action, CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler)
       w GitUI.CommandsDialogs.FormBrowse.GetSubmoduleStatusAsync(SubmoduleInfo info, CancellationToken cancelToken) w C:\d\projekty\gitextensions\GitUI\CommandsDialogs\FormBrowse.cs:wiersz 3220
       w GitUI.CommandsDialogs.FormBrowse.<>c__DisplayClass280_0.<UpdateSubmodulesList>b__0() w C:\d\projekty\gitextensions\GitUI\CommandsDialogs\FormBrowse.cs:wiersz 3279
       w System.Threading.Tasks.Task`1.InnerInvoke()
       w System.Threading.Tasks.Task.Execute()
  InnerException: 
jbialobr added a commit to jbialobr/gitextensions that referenced this issue Apr 7, 2018
…3278.

Task.Factory.StartNew requires the provided cancellationToken not to be disposed.
@jbialobr jbialobr added this to the 3.00 milestone Apr 7, 2018
@sharwell
Copy link
Member

sharwell commented Apr 7, 2018

@jbialobr How did you end up hitting this case? It appears to be a duplicate of #4761 - the exception in question should only be thrown if the application is .NET 4.5.2 or earlier (which GitExtensions is not).

@jbialobr
Copy link
Member Author

jbialobr commented Apr 7, 2018

This is an old bug, it happened while normal working with GE run from debugger (on repo refresh). I often encountered it in the past but not recently.

@gerhardol
Copy link
Member

There has been a number of issues with submodules handling, seen more in the debugger but could occur in real scenarios too (at least with more submodules than GE). I prepared a patch to fix some of the problems but postponed the work when the threading rework done. Nice to see some proper corrections.

jbialobr added a commit to jbialobr/gitextensions that referenced this issue Apr 8, 2018
…3278.

Task.Factory.StartNew requires the provided cancellationToken not to be disposed.
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