Source Tree suddenly is failing to start
Asked by Mike Walker:

I've actually been using Source Tree today. After closing the application earlier it is now failing to start. Source Tress log shows.

ERROR \[2017-09-19 14:34:06,097\] \[1\] \[SourceTree.App\] \[.ctor\] - finish EnsureSquirrelExecutionStubIsCopied  
ERROR \[2017-09-19 14:34:06,235\] \[1\] \[SourceTree.App\] \[OnStartup\] - Failed to start  
System.NullReferenceException: Object reference not set to an instance of an object.  
at SourceTree.Notifications.NotificationsManager.SetOwner(NotificationDialogWindow notificationWindow)

I see other posts with this same error. Will a reinstall help at this point? If not what action can be taken?


Answers:
author: Cameron Haddad
body: Just found a fix for this on another thread by [Mike Corsaro](https://community.atlassian.com/t5/user/viewprofilepage/user-id/842547) <https://community.atlassian.com/t5/Sourcetree-questions/SourceTree-failed-to-start/qaq-p/642445>

Just add that setting node to our user.config XML file and it works. Should really be put into a new installer and made live ASAP.


author: Ana Retamal
body: As an update for this question, we have just started the progressive rollout of Sourcetree v2.3.5.0 which includes a fix for this issue. You should be prompted to upgrade sometime over the next 14 days or, alternatively, you can download theupdate directly here: <https://downloads.atlassian.com/software/sourcetree/windows/ga/SourceTreeSetup-2.3.5.0.exe>

Have a good day!

Ana

comments: author: Charlie Noble
body: You're referring to a prompt from the SourceTree application, right? If you have this issue you don't get those prompts because the application doesn't run, so the prompt isn't part of the solution here.

A solution would be to stop encouraging people to install the known-bad 2.3.1.0 currently being served from <https://www.sourcetreeapp.com/>. That's just putting more people into a situation that causes them to waste their time and get angry.

With the exception of the last three days when I couldn't use it at all, I enjoy SourceTree. You're doing a great job. Please capitalize on that work by putting 2.3.5.0 out there already so more users don't end up dropping SourceTree.


author: Cameron Haddad
body: I am having the same problem. Cleaned everything (AppData, registry). Tried version 2.3.1.0 and 2.2.4.0 and same problem.

The installer is a one click that runs in the background with no wizard or UI. This is really annoying as how do you know what its doing or if it worked.

Then there is a magical icon on the desktop that double clicking does nothing also.

My Log file is below. NullReferenceException should be easy enough to fix.

> ERROR \[2017-09-22 10:25:44,456\] \[1\] \[SourceTree.App\] \[.ctor\] - finish EnsureSquirrelExecutionStubIsCopied  
> ERROR \[2017-09-22 10:25:44,636\] \[1\] \[SourceTree.App\] \[OnStartup\] - Failed to start  
> System.NullReferenceException: Object reference not set to an instance of an object.  
> at SourceTree.Notifications.NotificationsManager.SetOwner(NotificationDialogWindow notificationWindow)  
> at SourceTree.Notifications.NotificationsManager.ShowNotificationDialog\[T\](NotificationDialogWindow notificationWindow, Tuple\`2 customAction, VistaTaskDialogIcon icon)  
> at SourceTree.Notifications.NotificationsManager.ShowNotificationDialog\[T\](String title, String message, Tuple\`2 customAction, String cancelLabel, String suppressionSetting, Action\`1 suppressionChangedAction, Object contentControl, String contentCommandLabel, Action contentAction)  
> at SourceTree.Notifications.NotificationsManager.ShowNotificationDialogWithYesConfirmation(String title, String message, String details)  
> at SourceTree.Configuration.WpfSpellCheckerPreFlightCheck.Run()  
> at SourceTree.AppRoot.RunPreFlightChecks()  
> at SourceTree.AppRoot.OnStartup(StartupEventArgs e)  
> at SourceTree.App.OnStartup(StartupEventArgs e)


author: Mikael Sandberg
body: You could try and do a reinstall, the other option is to install an older version of SourceTree and see if that works, you can find the download archive here <https://www.sourcetreeapp.com/download-archives>. 2.1.10.0 is the version I currently recommend to my developers if they experience any issues with the latest version.