Sourcetree stopped working [Windows 10]
Asked by BahadirY:

After new patches, sourcetree gives me this error whenever I made something related with repo usage. I'm using Github and BeanstalkApp.  

After I tinker with sourcetree error logs, I found this. I hope this will help about finding solution.

ERROR \[2015-12-18 05:43:14,266\] \[1\] \[SourceTree.AppRoot\] \[HandleCrash\] - Fatal error  
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---\> System.Windows.Markup.XamlParseException: Set property 'System.Windows.Controls.SpellCheck.IsEnabled' threw an exception. ---\> System.UnauthorizedAccessException: Creating an instance of the COM component with CLSID {7AB36653-1796-484B-BDFA-E74F1DB7C1DC} from the IClassFactory failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).  
at System.Windows.Documents.WinRTSpellerInterop..ctor()  
at System.Windows.Documents.SpellerInteropBase.CreateInstance()  
at System.Windows.Documents.Speller.EnsureInitialized()  
at System.Windows.Documents.Speller.SetCustomDictionaries(CustomDictionarySources dictionaryLocations, Boolean add)  
at System.Windows.Documents.TextEditor.SetCustomDictionaries(Boolean add)  
at System.Windows.Controls.SpellCheck.OnIsEnabledChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)  
at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)  
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)  
at System.Windows.Controls.TextBox.OnPropertyChanged(DependencyPropertyChangedEventArgs e)  
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)  
at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry\& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)  
at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)  
at System.Windows.Baml2006.WpfMemberInvoker.SetValue(Object instance, Object value)  
at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)  
--- End of inner exception stack trace ---  
at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri)  
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)  
at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)  
at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)  
at SourceTree.View.CommitAndFileStatusView..ctor() in C:\\projects\\[bitbucket.org](http://bitbucket.org)\\atlassian\\sourcetreewin-prod\\View\\CommitAndFileStatusView.xaml.cs:line 36  
--- End of inner exception stack trace ---  
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean\& canBeCached, RuntimeMethodHandleInternal\& ctor, Boolean\& bNeedSecurityCheck)  
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark\& stackMark)  
at System.Activator.CreateInstance\[T\]()  
at SourceTree.ViewModel.Utils.ViewModelToViewConverter\`2.ConvertTo(ITypeDescriptorContext context, CultureInfo culture, Object value, Type destinationType) in C:\\projects\\[bitbucket.org](http://bitbucket.org)\\atlassian\\sourcetreewin-prod\\ViewModel\\Utils\\ViewModelToViewConverter.cs:line 39  
at System.Windows.Controls.ContentPresenter.UseContentTemplate.BuildVisualTree(FrameworkElement container)  
at System.Windows.StyleHelper.ApplyTemplateContent(UncommonField\`1 dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate)  
at System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField\`1 templateDataField, FrameworkElement container)  
at System.Windows.FrameworkElement.ApplyTemplate()  
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\& hasDesiredSizeUChanged)  
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\& hasDesiredSizeUChanged)  
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.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 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.Border.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\& hasDesiredSizeUChanged)  
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 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 System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)  
at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean\& hasDesiredSizeUChanged)  
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.DockPanel.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.Decorator.MeasureOverride(Size constraint)  
at System.Windows.Documents.AdornerDecorator.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.Window.MeasureOverrideHelper(Size constraint)  
at System.Windows.Window.MeasureOverride(Size availableSize)  
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.Interop.HwndTarget.OnResize()  
at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)  
at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(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)


Answers:
author: thistimj
body: I just wanted to say that I had this problem, too. I even installed an older version of Sourcetree (1.6.23.0), and it still happened.

I managed to figure out that if I disabled the option to spell check commits (Tools \> Options \> General Tab), Sourcetree works just fine. If that box is checked, it just crashes.

If you can't get Sourcetree to open in order to uncheck that box, you can open the user.config file found at C:\\Users\\\<*username* \>\\AppData\\Local\\Atlassian\\SourceTree.exe\<*random_string* \>\\\<*version_number*\>\\user.config with a code editor and change the value of SpellCheckCommits to False.

I hope this helps someone else. It's been working for me so far.


author: David Emmerson
body: Spot on. Uninstalled 4.6.1 and that solved the issue.The known issue they list doesn't match our circumstances, so I'll check if there's a report on Connect about it.Thanks for tip


author: Mark Lemke
body: The same error occurs in our .NET WPF application on Windows 8.1/Windows 10 and .NET 4.6.1 using non-administrator accounts. Seems to be related to changes MS made with .NET 4.6.1 (<https://support.microsoft.com/en-us/kb/3088234>). We have no solution jet...


author: David Emmerson
body: Hi. Did anything else happen on this one? I'm having the same error in a different application and this is the only result I've found so far that mentions it.


Tags: beanstalk

error

windows