Sourcetree 2.3.5.0 crash
Asked by Ben Nairn:

I'm running Sourcetree on Windows 10 and have repos sitting on guest Ubuntu in Virtualbox. Everything was fine until yesterday, not sure what has changed. I'm getting crashes whenever I click the "+" to open a new tab to open a repo.

Details of three errors from Windows Event Viewer (anything key related I've xxxxed out):

**ERROR 1:**

Application: SourceTree.exe  
Framework Version: v4.0.30319  
Description: The process was terminated due to an unhandled exception.  
Exception Info: System.Runtime.InteropServices.SEHException  
at LibGit2Sharp.Core.NativeMethods.git_submodule_foreach(LibGit2Sharp.Core.git_repository\*, submodule_callback, IntPtr)  
at LibGit2Sharp.Core.Proxy.git_foreach\[\[System.IntPtr, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\],\[System.IntPtr, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxxxxxxx\],\[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxxxxxxx\]\](System.Func\`3\<IntPtr,IntPtr,System.__Canon\>, System.Func\`2\<System.Func\`4\<IntPtr,IntPtr,IntPtr,Int32\>,Int32\>, LibGit2Sharp.Core.GitErrorCode\[\])  
at LibGit2Sharp.SubmoduleCollection.GetEnumerator()  
at System.Linq.Enumerable.Any\[\[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxxxxxxx\]\](System.Collections.Generic.IEnumerable\`1\<System.__Canon\>)  
at SourceTree.Repo.RepoHandlerGit.Summary(System.String)  
at SourceTree.Repositories.RepositoryManager.CheckSummary(SourceTree.Model.Repository)  
at System.Threading.Tasks.Task.Execute()  
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.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef)  
at System.Threading.Tasks.Task.ExecuteEntry(Boolean)  
at SourceTree.Utils.PriorityScheduler.\<QueueTask\>b__8_0()  
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.Threading.ThreadHelper.ThreadStart()

**ERROR 2:**

Faulting application name: SourceTree.exe, version: 2.3.5.0, time stamp: 0x59d5304e  
Faulting module name: git2-15e1193.DLL, version: 0.26.0.0, time stamp: 0x5947ace2  
Exception code: 0xc0000006  
Fault offset: 0x000000000005cd92  
Faulting process id: 0x10558  
Faulting application start time: 0x01d36250dd287b90  
Faulting application path: C:\\Users\\Ben\\AppData\\Local\\SourceTree\\app-2.3.5\\SourceTree.exe  
Faulting module path: C:\\Users\\Ben\\AppData\\Local\\SourceTree\\app-2.3.5\\lib\\win32\\x64\\git2-15e1193.DLL  
Report Id: 30235bc9-8dc5-470b-b86b-f4b4af21b337  
Faulting package full name:  
Faulting package-relative application ID:

**ERROR 3:**

Windows cannot access the file for one of the following reasons: there is a problem with the network connection, the disk that the file is stored on, or the storage drivers installed on this computer; or the disk is missing. Windows closed the program Sourcetree because of this error.

Program: Sourcetree  
File:

The error value is listed in the Additional Data section.  
User Action  
1. Open the file again. This situation might be a temporary problem that corrects itself when the program runs again.  
2. If the file still cannot be accessed and  
- It is on the network, your network administrator should verify that there is not a problem with the network and that the server can be contacted.  
- It is on a removable disk, for example, a floppy disk or CD-ROM, verify that the disk is fully inserted into the computer.  
3. Check and repair the file system by running CHKDSK. To run CHKDSK, click Start, click Run, type CMD, and then click OK. At the command prompt, type CHKDSK /F, and then press ENTER.  
4. If the problem persists, restore the file from a backup copy.  
5. Determine whether other files on the same disk can be opened. If not, the disk might be damaged. If it is a hard disk, contact your administrator or computer hardware vendor for further assistance.

Additional Data  
Error value: C00000C4  
Disk type: 0


Answers:
author: minnsey
body: Hi   

Are any of the local files, e.g. Sourcetree installation, configuration files or repositories, stored on shared/network drives?  

Since the crash occurs inside libgit2, you could try disabling its use in the Tools/Options/Git tab using the "Disable libgit2 integration" option before trying to open a new repo/tab


Tags: bitbucket