I switched branches from a local branch to one in out BitBucket repository and Sourcetree crashed. When I opened it back up, it no longer had any of the branches I use. It still knew my login and knew where the master branch resides online, but I'm unable to clone it as it says the path to the .git file is an invalid URL (it's not, it copy-pasted it from the BitBucket site).
I've managed to track down the log file and found the timestamps of the crash and my first attempt to re-open the file. All subsequent attempts have been repeats of the errors listed below.
The error mentions that it can't find a part of the path 'C:\Users\myUser\AppData\Local\Temp\2\<filename>'. That folder is empty.
Here are the errors from the log:
ERROR [2017-07-18 09:56:49,098] [1] [SourceTree.Analytics.Crash.BugSplat.CrashAnalyticsService] [DispatcherUnhandledExceptionHandler] - DispatcherUnhandledExceptionHandler for [SourceTree, 2.1.2.5] called with [System.Windows.Threading.Dispatcher, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs]
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\myUser\AppData\Local\Temp\2\3roeat2u.rdq'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
at SourceTreeShared.TempFile.Create(String path)
at SourceTree.Bookmarks.BookmarkManager.SaveBookmarks(List`1 list, String folder)
at SourceTree.Bookmarks.BookmarkManager.SaveBookmarks()
at SourceTree.AppRoot.OnExit(ExitEventArgs e)
at SourceTree.App.OnExit(ExitEventArgs e)
at System.Windows.Application.DoShutdown()
at System.Windows.Application.ShutdownImpl()
at System.Windows.Application.ShutdownCallback(Object arg)
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)
ERROR [2017-07-18 09:57:10,583] [1] [SourceTree.Utils.UpdateHelper+<HasAvailableUpdates>d__17] [MoveNext] - Unable to check for Updates.
System.Exception: Couldn't acquire lock, is another instance running
at Squirrel.SingleGlobalInstance..ctor(String key, TimeSpan timeOut)
at Squirrel.UpdateManager.<acquireUpdateLock>b__31_0()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.UpdateManager.<CheckForUpdate>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at SourceTree.Utils.UpdateHelper.<CheckForUpdate>d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at SourceTree.Utils.UpdateHelper.<HasAvailableUpdates>d__17.MoveNext()
ERROR [2017-07-18 09:57:16,695] [1] [SourceTree.Analytics.Crash.BugSplat.CrashAnalyticsService] [DispatcherUnhandledExceptionHandler] - DispatcherUnhandledExceptionHandler for [SourceTree, 2.1.2.5] called with [System.Windows.Threading.Dispatcher, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs]
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\myUser\AppData\Local\Temp\2\zsg31m0t.e1z'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
at SourceTreeShared.TempFile.Create(String path)
at SourceTree.Bookmarks.BookmarkManager.SaveBookmarks(List`1 list, String folder)
at SourceTree.Bookmarks.BookmarkManager.SaveBookmarks()
at SourceTree.AppRoot.OnExit(ExitEventArgs e)
at SourceTree.App.OnExit(ExitEventArgs e)
at System.Windows.Application.DoShutdown()
at System.Windows.Application.ShutdownImpl()
at System.Windows.Application.ShutdownCallback(Object arg)
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)
I've uninstalled and reinstalled the sourcetree application, but have not yet touched any of the data in C:\Users\myUser\AppData\ as I don't know if I'll accidentally delete the data in my local branch.
Any assistance would be greatly appreciated. I have a week's worth of work in that local branch.