SourceTree crash on start
Asked by Martin Kou?a:

Hi,  
after installing WIndows 10 Anniversary Update, when I want start SourceTree I obtain crash report. When I click on "Send Error Report" it shows me: *Hi, We're currently still investigating this issue but it appears this crash is caused within one of our dependencies and is triggered when using Windows 10 Insider Preview 14xxx and a particular colour combination. It looks like there is an update to the dependency containing a fix and we will be integrating and testing shortly and aim to have a new release of SourceTree into beta shortly. Thanks for using SourceTree The SourceTree Development Team*

I'm not in Insider program. What can I do? I do not want to go back to previous Windows version,  
thanks,  
Martin


Answers:
author: Admir Tuzovi?
body: I have updated Windows 10 Enterprise to Anniversary update and ever since then Sourcetree keeps crashing right on start. I've updated to 1.9.6. to try to resolve issue but unfortunately without success.

Any tips?


author: Evert Et
body: I had the same problem and fixed it by upgrading to 1.9.6, only found on their twitter.   
<https://twitter.com/sourcetree/status/758788773056421888>

comments: author: Windy Hendwiananda
body: I have the same problem with win10 14393, ST crash on start where are previous version of ST? is this early access stable for productions? \*kinda na?ve questions


author: Rick Culpepper
body: As of this morning, I am experiencing the same problem. SourceTree crashes every time I start it.  

It started early this morning. I am moving my repositories to an external drive that is mounted in an empty directory (c:\\data). I used robocopy to make copies of the repositories. Then I opened SourceTree (1.9.6).   

For each migrated repository, i began to do the following.

* Add the new repository bookmark
* Synch the new repostory
* Delete the old repository

On the 1st repository, SourceTree crashed adding the new repository. However, it started back up with no troubles and the new repo was there. So I continued. after migrating about 4 repositories, it crashed adding another migrated repository. Now, it crashes on startup... every time.

I have uninstalled and reinstalled 1.9.6 several times now... to no avail.

!!! HELP, PLEASE !!!   

I rely on SourceTree professionally every day. I need it to function!

comments: author: Rick Culpepper
body: I managed to work around this.

1. Uninstall SourceTree 1.9.6
2. Remove EVERY reference to SourceTree from Windows Registry using RegEdit.exe
3. Remove EVERY SourceTree folder from disk
   1. ProgramData
   2. AppData \<== This removes your bookmarks which seemed to be the problem.
4. Install SourceTree 1.9.6
5. Add local repositories 1-by-1.

The first local repository I added cause SourceTree to crash. However, SourceTree restarted with no further (apparent) problems and allowed me to add the rest of my local repositories.   

Looks like I'm back up and running...


author: Sander Verhagen
body: I have followed some of these suggestions, although **not** removed everything using `RegEdit.exe`, but I've now gotten a situation where some random sampling of repositories *does* and some of them *don't* open. Not opening means: crash.

I don't see a pattern yet in *which* repositories make SourceTree crash, it's not specific to a particular Git server, I'm pointing to their local working copies, and those file paths exist, their names contain lowercase letters and dashes only, I've double-checked this with cleanly `clone`d versions of said repositories, and I inspected `bookmarks.xml` and these look just fine.

If I remove the offending repositories from SourceTree (e.g. from `bookmarks.xml` or via the user interface) and I re-add the repositories in question, the same happens.

This is the exception stacktrace in `sourcetree.log` when this happens:

```
ERROR [2016-08-07 18:44:41,685] [1] [SourceTree.Analytics.Crash.BugSplat.CrashAnalyticsService] [DispatcherUnhandledExceptionHandler] - DispatcherUnhandledExceptionHandler for [SourceTree, 1.9.6.0] called with [System.Windows.Threading.Dispatcher, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs]
System.NullReferenceException: Object reference not set to an instance of an object.
?? at SourceTree.Accounts.AccountManager.GetDefaultUserInformation(String& fullname, String& email) in D:\projects\bitbucket.org\atlassian\sourcetree\sourcetreewin-prod\Accounts\AccountManager.cs:line 108
?? at SourceTree.ViewModel.UserDetailsViewModel..ctor(Repository repo, Action`2 completionAction, ICustomActionsManager customActionsManager, ISchedulerManager schedulerManager, IRepositoryManager repositoryManager, IAnalyticsDataManager analyticsDataManager, ITraceManager traceManager, IDispatcher sourceTreeDispatcher, IAccountManager accountManager, IFailureHandler failureHandler, IDvcsManager dvcsManager, IRepositoryMonitorManager repositoryMonitorManager, IFileListViewManager fileListViewManager, IFileListContainerViewManager fileListContainerViewManager, IDiffViewManager diffViewManager, IConfigurationManager configurationManager, IProcessDialogViewManager processDialogViewManager, IChangeSetViewManager changeSetViewManager, INotificationsManager notificationsManager) in D:\projects\bitbucket.org\atlassian\sourcetree\sourcetreewin-prod\SourceTree.Api.UI.Wpf\ViewModel\UserDetailsViewModel.cs:line 64
?? at SourceTree.ViewModel.CommitAndFileStatusViewModel._CheckMinimumRequirementsBeforeEnterCommit() in D:\projects\bitbucket.org\atlassian\sourcetree\sourcetreewin-prod\SourceTree.Api.UI.Wpf\ViewModel\CommitAndFileStatusViewModel.cs:line 705
?? at SourceTree.ViewModel.CommitAndFileStatusViewModel.EnterCommitMode() in D:\projects\bitbucket.org\atlassian\sourcetree\sourcetreewin-prod\SourceTree.Api.UI.Wpf\ViewModel\CommitAndFileStatusViewModel.cs:line 603
?? at SourceTree.ViewModel.CommitAndFileStatusViewModel..ctor(Repository repo, IRepositoryTabContainerViewModel repositoryTabContainerViewModel, ICustomActionsManager customActionsManager, ISchedulerManager schedulerManager, IRepositoryManager repositoryManager, IAnalyticsDataManager analyticsDataManager, ITraceManager traceManager, IDispatcher dispatcher, IAccountManager accountManager, IFailureHandler failureHandler, IDvcsManager dvcsManager, IRepositoryMonitorManager repositoryMonitorManager, IFileListViewManager fileListViewManager, IFileListContainerViewManager fileListContainerViewManager, IDiffViewManager diffViewManager, IChangeSetViewManager changeSetViewManager, IProcessDialogViewManager processDialogViewManager, IConfigurationManager configurationManager, INotificationsManager notificationsManager, Boolean refreshImmediately, FileStatus overrideFilter) in D:\projects\bitbucket.org\atlassian\sourcetree\sourcetreewin-prod\SourceTree.Api.UI.Wpf\ViewModel\CommitAndFileStatusViewModel.cs:line 173
?? at SourceTree.ViewModel.RepoTabViewModel.set_CurrentRepoView(RepoViewMode value) in D:\projects\bitbucket.org\atlassian\sourcetree\sourcetreewin-prod\SourceTree.Api.UI.Wpf\ViewModel\RepoTabViewModel.cs:line 394
?? at SourceTree.ViewModel.RepoTabViewModel..ctor(Repository r, IRepositoryTabContainerViewModel repositoryTabContainerViewModel, ICustomActionsManager customActionsManager, ISchedulerManager schedulerManager, IRepositoryManager repositoryManager, IAnalyticsDataManager analyticsDataManager, ITraceManager traceManager, IDispatcher dispatcher, IAccountManager accountManager, IFailureHandler failureHandler, IDvcsManager dvcsManager, IBookmarkManager bookmarkManager, IRepositoryMonitorManager repositoryMonitorManager, IWebManager webManager, IFileListViewManager fileListViewManager, IFileListContainerViewManager fileListContainerViewManager, IDiffViewManager diffViewManager, IChangeSetViewManager changeSetViewManager, IConfigurationManager configurationManager, IProcessDialogViewManager processDialogViewManager, INotificationsManager notificationsManager, IEnumerable`1 extentionSideBarRoots) in D:\projects\bitbucket.org\atlassian\sourcetree\sourcetreewin-prod\SourceTree.Api.UI.Wpf\ViewModel\RepoTabViewModel.cs:line 154
?? at SourceTree.ViewModel.DefaultRepoTabViewFactory.GenerateViewModel(Repository repository, IRepositoryTabContainerViewModel repositoryTabContainerViewModel) in D:\projects\bitbucket.org\atlassian\sourcetree\sourcetreewin-prod\SourceTree.Api.UI.Wpf\ViewModel\DefaultRepoTabViewFactory.cs:line 125
?? at SourceTree.ViewModel.RepositoryTabContainerViewModel.AddNew(String path, Boolean wasCloned, RepoViewMode atView, String viewData) in D:\projects\bitbucket.org\atlassian\sourcetree\sourcetreewin-prod\SourceTree.Api.UI.Wpf\ViewModel\RepositoryTabContainerViewModel.cs:line 443
?? at SourceTree.ViewModel.RepositoryTabContainerViewModel.AddOrActivate(String path, RepoViewMode atView, String viewData) in D:\projects\bitbucket.org\atlassian\sourcetree\sourcetreewin-prod\SourceTree.Api.UI.Wpf\ViewModel\RepositoryTabContainerViewModel.cs:line 367
?? at SourceTree.ViewModel.RepositoryTabContainerViewModel.OpenRepoInTab(String path, RepoViewMode atView, String viewData) in D:\projects\bitbucket.org\atlassian\sourcetree\sourcetreewin-prod\SourceTree.Api.UI.Wpf\ViewModel\RepositoryTabContainerViewModel.cs:line 869
?? at SourceTree.ViewModel.Bookmarks.BookmarksPanelViewModel.OpenBookmark(BookmarkNode n) in D:\projects\bitbucket.org\atlassian\sourcetree\sourcetreewin-prod\SourceTree.Api.UI.Wpf\ViewModel\Bookmarks\BookmarksPanelViewModel.cs:line 584
?? at SourceTree.View.Bookmarks.BookmarksPanel.Treeview_OnMouseDoubleClick(Object sender, MouseButtonEventArgs e) in D:\projects\bitbucket.org\atlassian\sourcetree\sourcetreewin-prod\SourceTree.Ui.Bookmarks.Wpf.Mstv\View\Bookmarks\BookmarksPanel.xaml.cs:line 51
?? at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
?? at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
?? at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
?? at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
?? at System.Windows.Controls.Control.HandleDoubleClick(Object sender, MouseButtonEventArgs e)
?? at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
?? at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
?? at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
?? at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
?? at System.Windows.UIElement.OnMouseDownThunk(Object sender, MouseButtonEventArgs e)
?? at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
?? at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
?? at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
?? at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
?? at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
?? at System.Windows.Input.InputManager.ProcessStagingArea()
?? at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
?? at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
?? at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
?? at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
?? at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
?? at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
?? at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
?? 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)
```


author: Sander Verhagen
body: I believe 1.9.6.1 fixed it for me. [Must be this then](https://www.sourcetreeapp.com/update/WindowsReleaseNotes.html):
> SRCTREEWIN-6111 Fixed crashes caused by multi-column log view


author: Martin Kou?a
body: Thanks a lot,  
it works ![thumbs-up](/html/@6E43D49CFFDA0652A93DEB490F177BB7/images/emoticons/thumbs-up.png "thumbs-up")

Martin

comments: author: Sander Verhagen
body: Hi. Martin. What works?


author: Martin Kou?a
body: Hi,  
works SourceTree after installing 1.9.6. version as Evert Et wrote, It starts without crashing,  
Martin


author: Sander Verhagen
body: Great that it works for you, I have kind of the opposite problem, for me it stopped working when updating to 1.9.6. That was a few days after installing the Anniversary Update.


author: Sander Verhagen
body: I believe 1.9.6.1 fixed it for me. [Must be this then](https://www.sourcetreeapp.com/update/WindowsReleaseNotes.html):
> SRCTREEWIN-6111 Fixed crashes caused by multi-column log view