Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

SourceTree crashes on opening repository

James Harris February 27, 2015

I tried to open a second repository while a commit was in progress. SourceTree crashed and wouldn't re-open. I reinstalled and that didn't help, so I removed my AppData\Local\Atlassian folder. SourceTree then worked until I asked it to re-open that first repository, whereupon it crashed again and once again wouldn't re-open. git status doesn't show anything wrong with the repo. What can I do to get SourceTree working again?

13 answers

1 accepted

10 votes
Answer accepted
James Harris March 11, 2015

I contacted Atlassian Support; they suggested I might be seeing this bug: https://jira.atlassian.com/browse/SRCTREEWIN-3040

The suggested workaround is:

  • delete the contents of your C:\Users\<username>\AppData\Local\Temp folder
  • In the folder C:\Users\<username>\AppData\Local\Atlassian\SourceTree, there are some .txt files named after the pattern <date>_<hash>. Rename/move those files so SourceTree can't find them.

This fixed the problem for me.

Cherny Berbesí
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 15, 2015

Saved my life. I was working with the shell but it takes more time to jump between branches. Thanks a lot :)

Paul Zurlinden May 7, 2015

This worked for me too! Prior to finding this, I had all ready removed \Local\Atlassian\SourceTree from my system, so I did not need to do this again. However, after repeatedly uninstalling/reinstalling, changing registry entries, etc. I still could not get SourceTree to open. It was only after deleting contents from \Local\Temp would SourceTree even try to start! Thanks James Harris!

tienha
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 28, 2016

Thanks @James Harris. This worked for me!

Jeff Barnes
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 6, 2017

Same problem but none of the above worked. Added comment to above Jira link. Here are additional steps I tried:

  • Uninstalled SourceTree
  • Rebooted
  • Rename/Delete
    • all files +and folders+ in %localappdata%\Temp
    • directory %localappdata%\Atlassian\SourceTree.exe_Url_<hash>
    • directory %localappdata%\SourceTree
    • directory %localappdata%\Squirrel
    • directory %ProgramFiles(x86)%\Atlassian\SourceTree (requires admin permission)
Like Nilesh Kawale likes this
Pranab Jung Rana
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 30, 2017

Had the same problem and tried lot of solutions, but didn't work. This one did the trick perfectly. Just moved the files in sourcetree directory. Thanks @James Harris6.   

Like Evgeniy Vitalievich likes this
DougTait
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 26, 2018

JAmes Harris .. LIFE.SAVER.

 My PC shut down while a repository was open, and sourctree crashed every time I tried to re-open it (3 times in a row)

Deleting/renaming the files you suggested seems to have fixed it.

thank you !!

0 votes
Anthony Robert
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 10, 2020

I've uninstall Sourcetree and install Sourcetree multiple times, the problems still happens to me when I try to change from a repository to another, Sourcetree doesn't crash if I open one of the repo, but if i open another one it crashes ... Please help me

0 votes
Javier Otero
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 27, 2020

Hi.

For me the solution was delete sourcetreeconfig.json file under .git folder inside local repository folder.

 

Regards

0 votes
Gavin Sinai
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 23, 2019

Thanks - delete temp files has worked - lifesaver

0 votes
YishGene
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 19, 2017

Looking at the error logs in Event Viewer (Win7), I saw that the conflict was with git itself. I tried pulling the repo from the command line, this gave me some errors with STATing some of the folders, which is something that happens to me a lot when switching branches on matlab repos when matlab is running. Closed matlab, everything ok! 

0 votes
Eric Santarelli
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 30, 2015

I was having a similar problem, but the fix here didn't help, so I looked at EventViewer and found this interesting entry:

Faulting application path: C:\Program Files\Atlassian\SourceTree\SourceTree.exe

Faulting module path: C:\Program Files\Spybot - Search & Destroy 2\SDHook32.dll

Looks like this old version of Spybot (2.0.5.1) was causing problems with the latest version of SourceTree (1.6.14.0). I uninstalled it and SourceTree started working again, yai!

I've had Spybot installed on there for years but hadn't used this computer in a couple of months, and SourceTree used to work on it; it's possible that the incompatibility was introduced in a recent update.

0 votes
david_gilbertson March 11, 2015

Thanks @James Harris, deleting temp files fixed it for me.

 

This time away from SourceTree made me realise how awesome it is!

0 votes
david_gilbertson March 11, 2015

I did another uninstall/re-install but didn't add any repositories this time. I can now get in to Tools > Options, but as soon as I click on the Authentication tab it crashes. So I guess that points to some setting being 'corrupted' in some way, but not related to any repo. The setting must be somewhere other than the Atlassian folders in program files or AppData/Local...

0 votes
Mike Tully
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 11, 2015

I'm experiencing the same behavior as David for the last 2 days. Thought it was related to a windows update, but I restored to before the update and still have the same problem.

Windows 7
SourceTree Version 1.6.14.0

Here's the sourcetree.log entry:

2015-03-10T15:46:33: Fatal error: 
System.IO.IOException: The file exists.

2015-03-10T15:46:33: Stack trace: 
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.Path.InternalGetTempFileName(Boolean checkHost)
   at System.Windows.Input.Cursor.LoadFromStream(Stream cursorStream)
   at System.Windows.Controls.GridViewColumnHeader.GetCursor(Int32 cursorID)
   at System.Windows.Controls.GridViewColumnHeader.get_SplitCursor()
   at System.Windows.Controls.GridViewColumnHeader.HookupGripperEvents()
   at System.Windows.FrameworkElement.ApplyTemplate()
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.GridViewHeaderRowPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ScrollContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean&amp; hasDesiredSizeUChanged)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.ScrollViewer.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.DockPanel.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean&amp; hasDesiredSizeUChanged)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.ScrollViewer.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at Microsoft.Windows.Themes.ListBoxChrome.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.DockPanel.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean&amp; hasDesiredSizeUChanged)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean&amp; hasDesiredSizeUChanged)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean&amp; hasDesiredSizeUChanged)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
0 votes
david_gilbertson March 10, 2015

Me too, happened just today. Windows 7 and the latest SourceTree.

 

I've tried uninstalling, removing the whole AppData\Local\Atlassian folder and re-installing. It opens, and I can open a new repository, but as soon as I try to open one of the repositories I was using previously it crashes.

 

And now (halfway through writing this) it won't open at all.

 

When it first occurred I had just gone into settings and changed something about which user to use for the repository.

 

Three errors show up in event viewer. the .NET Runtime logged error is:

Application: SourceTree.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.IOException
Stack:
at System.Windows.Window.ShowDialog()
at TaskDialogInterop.TaskDialog.ShowEmulatedTaskDialog(TaskDialogInterop.TaskDialogOptions)
at TaskDialogInterop.TaskDialog.Show(TaskDialogInterop.TaskDialogOptions)
at SourceTree.Utils.GeneralHelper.ShowMessageBox(System.String, System.String, System.String, System.String[], TaskDialogInterop.VistaTaskDialogIcon, System.String, System.String, System.String, TaskDialogInterop.VistaTaskDialogIcon)
at SourceTree.AppRoot.HandleCrash(System.Exception)
at SourceTree.AppRoot.DispatcherUnhandledExceptionHandler(System.Object, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs)
at System.Windows.Threading.Dispatcher.CatchException(System.Exception)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr, IntPtr, Int32, IntPtr, IntPtr)
at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr, IntPtr, Int32, IntPtr, IntPtr)
at MS.Win32.HwndSubclass.DefWndProcWrapper(IntPtr, Int32, IntPtr, IntPtr)
at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr, IntPtr, Int32, IntPtr, IntPtr)
at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr, IntPtr, Int32, IntPtr, IntPtr)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
at MS.Win32.UnsafeNativeMethods.SetWindowPos(System.Runtime.InteropServices.HandleRef, System.Runtime.InteropServices.HandleRef, Int32, Int32, Int32, Int32, Int32)
at MS.Win32.UnsafeNativeMethods.SetWindowPos(System.Runtime.InteropServices.HandleRef, System.Runtime.InteropServices.HandleRef, Int32, Int32, Int32, Int32, Int32)
at System.Windows.Window.SetupInitialState(Double, Double, Double, Double)
at System.Windows.Window.CreateSourceWindow(Boolean)
at System.Windows.Window.ShowHelper(System.Object)
at System.Windows.Window.ShowDialog()
at TaskDialogInterop.TaskDialog.ShowEmulatedTaskDialog(TaskDialogInterop.TaskDialogOptions)
at TaskDialogInterop.TaskDialog.Show(TaskDialogInterop.TaskDialogOptions)
at SourceTree.Utils.GeneralHelper.ShowMessageBox(System.String, System.String, System.String, System.String[], TaskDialogInterop.VistaTaskDialogIcon, System.String, System.String, System.String, TaskDialogInterop.VistaTaskDialogIcon)
at SourceTree.AppRoot.HandleCrash(System.Exception)
at SourceTree.AppRoot.DispatcherUnhandledExceptionHandler(System.Object, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs)
at System.Windows.Threading.Dispatcher.CatchException(System.Exception)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
at System.Windows.Application.RunInternal(System.Windows.Window)
at System.Windows.Application.Run()
at SourceTree.App.Main()
0 votes
ocococ
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 1, 2015

Same problem here too : systematic crash when opening a newly cloned repository in Source Tree.

First fresh install of SourceTree 1.6.14.0 under Windows 8.1.

No problem at all on Mac.

Problem signature:
  Problem Event Name:    CLR20r3
  Problem Signature 01:    SourceTree.exe
  Problem Signature 02:    1.6.14.0
  Problem Signature 03:    54ea9dbe
  Problem Signature 04:    mscorlib
  Problem Signature 05:    4.0.30319.34014
  Problem Signature 06:    52e0b676
  Problem Signature 07:    4797
  Problem Signature 08:    15
  Problem Signature 09:    System.Windows.Markup.XamlParse
  OS Version:    6.3.9600.2.0.0.256.4
  Locale ID:    1036
  Additional Information 1:    8229
  Additional Information 2:    82291666874e4851f6a1f358641f58fe
  Additional Information 3:    c5e3
  Additional Information 4:    c5e330202c92bb608c2caebba3e83405
0 votes
James Harris February 27, 2015

And the signature from the second "SourceTree has stopped working" window that comes up after I dismiss the first one: Problem signature: Problem Event Name: APPCRASH Application Name: SourceTree.exe Application Version: 1.6.14.0 Application Timestamp: 54ea9dbe Fault Module Name: KERNELBASE.dll Fault Module Version: 6.1.7601.18409 Fault Module Timestamp: 5315a05a Exception Code: c000041d Exception Offset: 000000000000940d OS Version: 6.1.7601.2.1.0.256.48 Locale ID: 1033 Additional Information 1: cb1d Additional Information 2: cb1d5081ae75d25ba5fcdd8622ae2654 Additional Information 3: 4b4e Additional Information 4: 4b4eed6de7b30fa8fda2d3d21f61ec59

0 votes
James Harris February 27, 2015

I'm running Windows 7. Here's the problem signature: Problem signature: Problem Event Name: CLR20r3 Problem Signature 01: sourcetree.exe Problem Signature 02: 1.6.14.0 Problem Signature 03: 54ea9dbe Problem Signature 04: mscorlib Problem Signature 05: 4.0.30319.18444 Problem Signature 06: 52717d7e Problem Signature 07: 4427 Problem Signature 08: 9a Problem Signature 09: System.IO.IOException OS Version: 6.1.7601.2.1.0.256.48 Locale ID: 1033 Additional Information 1: 8379 Additional Information 2: 83794c20b18404a64c9395020af43d45 Additional Information 3: c4d1 Additional Information 4: c4d183333186e4c6936d30ad4def6b76

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events