Skip to content

[NBug] One or more errors occurred. (A task was canceled.) #11980

@BlueHeaven1969

Description

@BlueHeaven1969

Environment

  • Git Extensions 5.0.0.17897
  • Build 2a3b78b
  • Git 2.47.0.windows.1
  • Microsoft Windows NT 10.0.19045.0
  • .NET 8.0.8
  • DPI 96dpi (no scaling)
  • Portable: False

Issue description

System.AggregateException: One or more errors occurred. (A task was canceled.)
 ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
   at System.Threading.Tasks.Task.GetExceptions(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at GitUI.ThreadHelper.CompletedResult[T](Task`1 task) in C:\projects\gitextensions\src\app\GitExtUtils\GitUI\ThreadHelper.cs:line 116
   at GitUI.FileStatusList.FormatListViewItem(ListViewItem item, PathFormatter formatter, Int32 itemWidth) in C:\projects\gitextensions\src\app\GitUI\UserControls\FileStatusList.cs:line 549
   at System.Linq.Enumerable.MinMaxInteger[T,TMinMax](IEnumerable`1 source)
   at GitUI.FileStatusList.<UpdateColumnWidth>g__GetWidth|139_0() in C:\projects\gitextensions\src\app\GitUI\UserControls\FileStatusList.cs:line 1348
   at GitUI.FileStatusList.UpdateColumnWidth() in C:\projects\gitextensions\src\app\GitUI\UserControls\FileStatusList.cs:line 1336
   at GitUI.FileStatusList.UpdateFileStatusListView(IReadOnlyList`1 items, Boolean updateCausedByFilter) in C:\projects\gitextensions\src\app\GitUI\UserControls\FileStatusList.cs:line 1194
   at GitUI.FileStatusList.SetDiffsAsync(IReadOnlyList`1 revisions, ObjectId headId, CancellationToken cancellationToken) in C:\projects\gitextensions\src\app\GitUI\UserControls\FileStatusList.cs:line 815
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
   at Microsoft.VisualStudio.Threading.JoinableTaskFactory.SingleExecuteProtector.TryExecute()
   at Microsoft.VisualStudio.Threading.JoinableTaskFactory.SingleExecuteProtector.<>c.<.cctor>b__20_0(Object state)
   at InvokeStub_SendOrPostCallback.Invoke(Object, Span`1)
   at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(HWND hWnd, MessageId msg, WPARAM wparam, LPARAM lparam)
   at Windows.Win32.PInvoke.DispatchMessage(MSG* lpMsg)
   at System.Windows.Forms.Application.ComponentManager.Microsoft.Office.IMsoComponentManager.FPushMessageLoop(UIntPtr dwComponentID, msoloop uReason, Void* pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(msoloop reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(msoloop reason, ApplicationContext context)
   at GitUI.GitUICommands.StartBrowseDialog(IWin32Window owner, BrowseArguments args) in C:\projects\gitextensions\src\app\GitUI\GitUICommands.cs:line 1158
   at GitExtensions.Program.RunApplication() in C:\projects\gitextensions\src\app\GitExtensions\Program.cs:line 198
   at GitExtensions.Program.Main() in C:\projects\gitextensions\src\app\GitExtensions\Program.cs:line 110
--- End of stack trace from previous location ---

   --- End of inner exception stack trace ---
   at void System.Threading.Tasks.Task.ThrowIfExceptional(bool includeTaskCanceledExceptions)
   at TResult System.Threading.Tasks.Task<TResult>.GetResultCore(bool waitCompletionNotification)
   at T GitUI.ThreadHelper.CompletedResult<T>(Task<T> task) in C:/projects/gitextensions/src/app/GitExtUtils/GitUI/ThreadHelper.cs:line 116
   at (Image image, string prefix, string text, string suffix, int prefixTextStartX, int textWidth, int textMaxWidth) GitUI.FileStatusList.FormatListViewItem(ListViewItem item, PathFormatter formatter, int itemWidth) in C:/projects/gitextensions/src/app/GitUI/UserControls/FileStatusList.cs:line 549
   at T System.Linq.Enumerable.MinMaxInteger<T, TMinMax>(IEnumerable<T> source)
   at void GitUI.FileStatusList.UpdateColumnWidth()+GetWidth() in C:/projects/gitextensions/src/app/GitUI/UserControls/FileStatusList.cs:line 1348
   at void GitUI.FileStatusList.UpdateColumnWidth() in C:/projects/gitextensions/src/app/GitUI/UserControls/FileStatusList.cs:line 1336
   at void GitUI.FileStatusList.UpdateFileStatusListView(IReadOnlyList<FileStatusWithDescription> items, bool updateCausedByFilter) in C:/projects/gitextensions/src/app/GitUI/UserControls/FileStatusList.cs:line 1194
   at async Task GitUI.FileStatusList.SetDiffsAsync(IReadOnlyList<GitRevision> revisions, ObjectId headId, CancellationToken cancellationToken) in C:/projects/gitextensions/src/app/GitUI/UserControls/FileStatusList.cs:line 815
   at async void GitUI.TaskManager.InvokeAndForget(Control control, Func<Task> asyncAction, CancellationToken cancellationToken)+(?) => { } [1] in C:/projects/gitextensions/src/app/GitExtUtils/GitUI/TaskManager.cs:line 119
   at async Task GitUI.TaskManager.HandleExceptionsAsync(Func<Task> asyncAction, Func<Exception, Task> handleExceptionAsync) in C:/projects/gitextensions/src/app/GitExtUtils/GitUI/TaskManager.cs:line 32

Did a compare to working directory. It appears the issues were with submodules.

Steps to reproduce

Did a "Compare to working directory" from a commit using the context menu. The repo has submodules that were updated. It appears the error was here as there is no text after the submodule icon in the file list.

Did this work in previous version of GitExtensions?

Yes

Diagnostics

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions