SourceTree crashes on startup, System.InvalidOperationException.
Asked by Micha? Knapi?ski:

Hi.

There is a problem with my copy of sourcetree. It starts only once after clean install. After it's closed and I try to restart it, the process is terminated almost immediately and I get this log message:  

ERROR \[2017-08-01 13:30:57,276\] \[1\] \[SourceTree.App\] \[OnStartup\] - Failed to start  
System.InvalidOperationException: W?a?ciwo?ci Owner nie mo?na ustawi? dla obiektu typu Window, kt?ry nie zosta? wcze?niej wy?wietlony.  
w System.Windows.Window.set_Owner(Window value)  
w SourceTree.Notifications.NotificationsManager.ShowNotificationDialog\[T\](NotificationDialogWindow notificationWindow, Tuple\`2 customAction, VistaTaskDialogIcon icon)  
w SourceTree.Repo.RepoHandlerGitOld.CheckLargeFilesInstalled(Boolean fixAndpromptUser)  
w SourceTree.Repo.RepoHandlerGitOld.CheckIfGitLfsRequiredForRepo(String path, Boolean fixAndpromptUser)  
w SourceTree.Repo.RepoHandlerGitOld.CheckConfigForRepo(String path, Boolean fixAndpromptUser)  
w SourceTree.ViewModel.RepositoryTabContainerViewModel.AddNew(String path, Boolean wasCloned, RepoViewMode atView, String viewData)  
w SourceTree.ViewModel.RepositoryTabContainerViewModel.AddOrActivate(String path, RepoViewMode atView, String viewData)  
w SourceTree.ViewModel.RepositoryTabContainerViewModel.OpenRepoInTab(String path, RepoViewMode atView, String viewData)  
w SourceTree.AppRoot.SingleInstanceOpenRepo(Boolean isFirstInstance, String targetRepo, RepoViewMode view, String data)  
w SourceTree.AppRoot.ProcessArguments(Boolean isFirstInstance)  
w SourceTree.AppRoot.DoWindowStartupTasks()  
w SourceTree.ViewModel.MainWindowViewModel..ctor(IRepositoryTabContainerViewModel repositoryTabContainerViewModel, ICustomActionsManager customActionsManager, IRepositoryManager repositoryManager, IAnalyticsDataManager analyticsDataManager, ITraceManager traceManager, IDispatcher dispatcher, IAccountManager accountManager, IFailureHandler failureHandler, IDvcsManager dvcsManager, IConfigurationManager configurationManager, IInstanceManager instanceManager, ISchedulerManager schedulerManager, IWebManager webManager, IRepositoryMonitorManager repositoryMonitorManager, ISshKeyManager sshKeyManager, INotificationsManager notificationsManager, IPreferencesManager preferencesManager)  
w SourceTree.MainWindow..ctor(IRepositoryTabContainerViewModel repositoryTabContainerViewModel, ICustomActionsManager customActionsManager, IRepositoryManager repositoryManager, IAnalyticsDataManager analyticsDataManager, ITraceManager traceManager, IDispatcher dispatcher, IAccountManager accountManager, IFailureHandler failureHandler, IDvcsManager dvcsManager, IConfigurationManager configurationManager, IInstanceManager instanceManager, ISchedulerManager schedulerManager, IWebManager webManager, IRepositoryMonitorManager repositoryMonitorManager, IApplicationManager applicationManager, ISshKeyManager sshKeyManager, INotificationsManager notificationsManager, IBookmarkManager bookmarkManager, IPreferencesManager preferencesManager)  
w SourceTree.AppRoot.OnStartup(StartupEventArgs e)  

any ideas, please?


Answers:
author: Ana Retamal
body: Hi Micha?, looks like you're affected by this bug [SRCTREEWIN-7373](https://jira.atlassian.com/browse/SRCTREEWIN-7373).

Please, download and install the latest Git-LFS version from <https://git-lfs.github.com/>. This will re-install Git-LFS and should ensure SourceTree can find it.

Let us know if this worked for you! If you are still experiencing issues after this, remember to provide which Windows version are you using so we can continue helping you.

Cheers,

Ana

comments: author: Micha? Knapi?ski
body: Hi Ana, thank you for your help.  

IT WORKED. I cannot express in any concise way, what a relief and good news this is. After following your instructions sourcetree started without any problems and works stable. Oh, and I was using Windows 10 Pro(x64).

Once again, thank you for great support.  
Cheers,

Micha?


Tags: windows