Recursive Call To Automation Peer Error

5 posts, 0 answers
  1. Jonah
    Jonah avatar
    29 posts
    Member since:
    Oct 2012

    Posted 18 Sep 2014 Link to this post

    So myself and another developer are working on the same program. On my computer, everything works fine. On his in development mode, or on others at run time, I get this error. I have seen this error on other posts but they look fairly dated and take care of. Anyone else have issues with this?


    at System.Windows.Automation.Peers.AutomationPeer.GetChildren()
       at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent)
       at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent)
       at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent)
       at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent)
       at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent)
       at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent)
       at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent)
       at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent)
       at System.Windows.Automation.Peers.AutomationPeer.ValidateConnected(AutomationPeer connectedPeer)
       at MS.Internal.Automation.ElementProxy.StaticWrap(AutomationPeer peer, AutomationPeer referencePeer)
       at System.Windows.Automation.Peers.AutomationPeer.UpdateChildrenInternal(Int32 invalidateLimit)
       at System.Windows.Automation.Peers.AutomationPeer.UpdateChildren()
       at System.Windows.Automation.Peers.AutomationPeer.ResetChildrenCache()
       at Telerik.Windows.Automation.Peers.RadTabControlAutomationPeer.GetChildrenCore()
       at System.Windows.Automation.Peers.AutomationPeer.EnsureChildren()
       at System.Windows.Automation.Peers.AutomationPeer.GetChildren()
       at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent)
       at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent)
       at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent)
       at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent)
       at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent)
       at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent)
       at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent)
       at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent)
       at System.Windows.Automation.Peers.AutomationPeer.ValidateConnected(AutomationPeer connectedPeer)
       at MS.Internal.Automation.ElementProxy.StaticWrap(AutomationPeer peer, AutomationPeer referencePeer)
       at System.Windows.Automation.Peers.AutomationPeer.ProviderFromPeer(AutomationPeer peer)
       at System.Windows.Automation.Peers.AutomationPeer.RaiseAutomationEvent(AutomationEvents eventId)
       at System.Windows.Automation.Peers.SelectorAutomationPeer.RaiseSelectionEvents(SelectionChangedEventArgs e)
       at System.Windows.Controls.ListBox.OnSelectionChanged(SelectionChangedEventArgs e)
       at System.Windows.Controls.Primitives.Selector.InvokeSelectionChanged(List`1 unselectedInfos, List`1 selectedInfos)
       at System.Windows.Controls.Primitives.Selector.SelectionChanger.End()
       at System.Windows.Controls.Primitives.Selector.SelectionChanger.SelectJustThisItem(ItemInfo info, Boolean assumeInItemsCollection)
       at System.Windows.Controls.Primitives.Selector.SetSelectedToCurrent()
       at System.Windows.Controls.Primitives.Selector.OnItemsChanged(NotifyCollectionChangedEventArgs e)
       at System.Windows.Controls.ItemsControl.OnItemCollectionChanged2(Object sender, NotifyCollectionChangedEventArgs e)
       at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
       at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
       at System.Windows.Controls.ItemCollection.OnViewCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
       at System.Windows.WeakEventManager.ListenerList`1.DeliverEvent(Object sender, EventArgs e, Type managerType)
       at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
       at System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
       at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
       at System.Windows.Data.ListCollectionView.RefreshOverride()
       at System.Windows.Data.CollectionView.RefreshInternal()
       at System.Windows.Data.CollectionView.Refresh()
       at System.Windows.Data.CollectionView.EndDefer()
       at System.Windows.Data.CollectionView.DeferHelper.Dispose()
       at System.Windows.Controls.ItemCollection.SetCollectionView(CollectionView view)
       at System.Windows.Controls.ItemCollection.SetItemsSource(IEnumerable value, Func`2 GetSourceItem)
       at System.Windows.Controls.ItemsControl.OnItemsSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.FrameworkElement.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.InvalidateProperty(DependencyProperty dp, Boolean preserveCurrentValue)
       at System.Windows.Data.BindingExpressionBase.Invalidate(Boolean isASubPropertyChange)
       at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
       at System.Windows.Data.BindingExpression.Activate(Object item)
       at System.Windows.Data.BindingExpression.AttachToContext(AttachAttempt attempt)
       at System.Windows.Data.BindingExpression.MS.Internal.Data.IDataBindEngineClient.AttachToContext(Boolean lastChance)
       at MS.Internal.Data.DataBindEngine.Task.Run(Boolean lastChance)
       at MS.Internal.Data.DataBindEngine.Run(Object arg)
       at MS.Internal.Data.DataBindEngine.OnLayoutUpdated(Object sender, EventArgs e)
       at System.Windows.ContextLayoutManager.fireLayoutUpdateEvent()
       at System.Windows.ContextLayoutManager.UpdateLayout()
       at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
       at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
       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)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Threading.DispatcherOperation.Invoke()
       at System.Windows.Threading.Dispatcher.ProcessQueue()
       at System.Windows.Threading.Dispatcher.WndProcHook(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..
  2. Kiril Vandov
    Admin
    Kiril Vandov avatar
    324 posts

    Posted 19 Sep 2014 Link to this post

    Hello Jonah,

    We have tried to reproduce the issue on our side but with no success. That is why I would like to ask you for more information:
    - what is the exact version of your binaries?
    - when does the issue occur?
    - what exception do you get when the error occur?
    - does the error occur on a PC with touch monitor or on a touch device?

    Can you provide us with a sample project in which you have reproduced the issue as we are not sure what might have caused the issue.

    Also if you are not using the automation peers since Q2 2014 SP you can now disable them, you can find more information on how to do that in this article.

    Looking froward to hearing from you.

    Kind regards,
    Kiril Vandov
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Jonah
    Jonah avatar
    29 posts
    Member since:
    Oct 2012

    Posted 19 Sep 2014 in reply to Kiril Vandov Link to this post

    Version 2014.2.729.45
    This occurs when I bind an image to a RadImageEditor that is inside a RadTabControl
    The RadImageEditor has a converter that will convert it from a byte array to a RadImage and back
    Exception: Recursive call to Automation Peer API is not valid.
    Error occurs on a PC without a touch monitor
    My project is very large and requires a connection to my internal database.
  5. Jonah
    Jonah avatar
    29 posts
    Member since:
    Oct 2012

    Posted 19 Sep 2014 Link to this post

    I went and disabled the automation and that seemed to do the trick.
  6. Kiril Vandov
    Admin
    Kiril Vandov avatar
    324 posts

    Posted 23 Sep 2014 Link to this post

    Hello Jonah,

    We were not able to reproduce the issue with a RadTabControl and an ImageEditor inside one of its TabItems. The automation peers errors are one of the hardest to reproduce as they depend on multiple conditions, such as OS, the content of the application, third party tools for inspection.
    We will be happy to further investigate the issue if you can provide us with a sample project in which we can reproduce it on our side.

    Kind regards,
    Kiril Vandov
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top
UI for WPF is Visual Studio 2017 Ready