Application crashes a few seconds after starting. After repeated attempts application will eventually start without crashing. Using Sourcetree for Windows build 3.4.11.
Error message in log:
ERROR [2023-01-28 08:59:37,542] [1] [SourceTree.App] [Log] - An exception was thrown by a TaskScheduler.
System.Threading.Tasks.TaskSchedulerException: An exception was thrown by a TaskScheduler. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at SourceTree.Utils.PriorityScheduler.QueueTask(Task task)
   at System.Threading.Tasks.Task.ScheduleAndStart(Boolean needsProtection)
   --- End of inner exception stack trace —
   at System.Threading.Tasks.Task.ScheduleAndStart(Boolean needsProtection)
   at System.Threading.Tasks.Task.InternalStartNew(Task creatingTask, Delegate action, Object state, CancellationToken cancellationToken, TaskScheduler scheduler, TaskCreationOptions options, InternalTaskOptions internalOptions, StackCrawlMark& stackMark)
   at System.Threading.Tasks.TaskFactory.StartNew(Action action, CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler)
   at SourceTree.ViewModel.Bookmarks.BookmarksPanelViewModel.<>c_DisplayClass148_1.<RefreshRepositorySummary>b_0(BookmarkNode item)
   at SourceTree.Utils.Extensions.<>c_DisplayClass16_1`1.<<ForEachAsync>b_1>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at SourceTree.ViewModel.Bookmarks.BookmarksPanelViewModel.<RefreshRepositorySummary>d__148.MoveNext()
— End of stack trace from previous location where exception was thrown —
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at SourceTree.ViewModel.Bookmarks.BookmarksPanelViewModel.<InitAsync>d__147.MoveNext()
— End of stack trace from previous location where exception was thrown —
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at SourceTree.View.Bookmarks.BookmarksPanel.<BookmarksPanel_DataContextChanged>d__14.MoveNext()
— End of stack trace from previous location where exception was thrown —
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)