Recursive Call To Automation Peer Error

6 posts, 0 answers
  1. Markus
    Markus avatar
    42 posts
    Member since:
    Nov 2012

    Posted 16 Feb 2015 Link to this post

    Hi,
    I have some strange behavior. I can not reproduce the error, all I can say is that the error only occurs on my Samsung Tablet Windows 8.1 2 GB of RAM (Touch).

    Binary Version: 2014.3.1202.45

    Exception Type: System.InvalidOperationException 
    Message: Recursive call to Automation Peer API is not valid
    Stack trace:
    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.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 Telerik.Windows.Automation.Peers.RibbonViewAutomationPeer.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.ValidateConnected(AutomationPeer connectedPeer)
    at System.Windows.Automation.Peers.AutomationPeer.AutomationPeerFromInputElement(IInputElement focusedElement)
    at System.Windows.Automation.Peers.AutomationPeer.RaiseFocusChangedEventHelper(IInputElement newFocus)
    at System.Windows.Input.KeyboardDevice.ChangeFocus(DependencyObject focus, Int32 timestamp)
    at System.Windows.Input.KeyboardDevice.TryChangeFocus(DependencyObject newFocus, IKeyboardInputProvider keyboardInputProvider, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed)
    at System.Windows.Input.KeyboardDevice.Focus(DependencyObject focus, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed)
    at System.Windows.Input.KeyboardDevice.Focus(IInputElement element)
    at System.Windows.UIElement.Focus()
    at System.Windows.Documents.TextEditorMouse.MoveFocusToUiScope(TextEditor This)
    at System.Windows.Documents.TextEditorMouse.OnMouseDown(Object sender, MouseButtonEventArgs e)
    at System.Windows.Controls.Primitives.TextBoxBase.OnMouseDown(MouseButtonEventArgs e)
    at System.Windows.UIElement.OnMouseDownThunk(Object sender, MouseButtonEventArgs e)
    at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
    at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
    at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
    at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
    at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
    at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
    at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
    at System.Windows.Input.InputManager.ProcessStagingArea()
    at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
    at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
    at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
    at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    at System.Windows.Interop.HwndSource.InputFilterMessage(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 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

    Can you please help me with that error.

    Regards Markus


  2. Kiril Vandov
    Admin
    Kiril Vandov avatar
    324 posts

    Posted 18 Feb 2015 Link to this post

    Hello Markus,

    We have recently fixed a recursive call caused by the automation peers but we are not sure that this is the same issue that you have. The fix is included in our latest internal build, that is why I would like to ask you to download our latest internal build and try to reproduce the issue. If you are able to reproduce the issue again could you please provide us with an isolated sample project in which we could reproduce the issue.

    Looking forward to hearing from you.

    Kind regards,
    Kiril Vandov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Markus
    Markus avatar
    42 posts
    Member since:
    Nov 2012

    Posted 18 Feb 2015 in reply to Kiril Vandov Link to this post

    Thank you very much! I will test it with the internal build.

    Kind Regards
    Markus
  5. Marc
    Marc avatar
    4 posts
    Member since:
    May 2011

    Posted 16 Mar 2015 in reply to Kiril Vandov Link to this post

    We have a user reporting a similar call stack we are on WPF UI 2014.3.1202
    Does 2015.1.0225 have the fix for this?

    Exception :
    Recursive call to Automation Peer API is not valid.

    StackTrace :
       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.ValidateConnected(AutomationPeer connectedPeer)
       at MS.Internal.Automation.ElementProxy.StaticWrap(AutomationPeer peer, AutomationPeer referencePeer)
       at System.Windows.Automation.Peers.AutomationPeer.UpdateChildrenInternal(Int32 invalidateLimit)
       at Telerik.Windows.Automation.Peers.RibbonViewAutomationPeer.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.ValidateConnected(AutomationPeer connectedPeer)
       at System.Windows.Automation.Peers.AutomationPeer.RaiseFocusChangedEventHelper(IInputElement newFocus)
       at System.Windows.Input.KeyboardDevice.ChangeFocus(DependencyObject focus, Int32 timestamp)
       at System.Windows.Input.KeyboardDevice.Focus(DependencyObject focus, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed)
       at System.Windows.Input.KeyboardDevice.Focus(IInputElement element)
       at System.Windows.Interop.HwndKeyboardInputProvider.OnSetFocus(IntPtr hwnd)
       at System.Windows.Interop.HwndKeyboardInputProvider.FilterMessage(IntPtr hwnd, WindowMessage message, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at System.Windows.Interop.HwndSource.InputFilterMessage(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 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

  6. Markus
    Markus avatar
    42 posts
    Member since:
    Nov 2012

    Posted 18 Mar 2015 Link to this post

    Hi,
    since the new version the error doesn't occur anymore.
    Although I was not able to reproduce the error on the old version.

    Regards Markus
  7. Kiril Vandov
    Admin
    Kiril Vandov avatar
    324 posts

    Posted 19 Mar 2015 Link to this post

    Hello Marc,

    We haven't got any "Recursive call to Automation Peer API is not valid." errors reported from our clients since we release the fix which is included in binaries 2015.1.0225. However if you can send us an isolated project reproducing the issue we could test it out and check if it reproduced with our latest binaries and let you know.

    Kind regards,
    Kiril Vandov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for WPF is Visual Studio 2017 Ready