The Specified Visual Is Not An Ancestor Of This Visual

Error fix for " The specified Visual is not an ancestor of this visual" .

When trying to execute any type of activities, the error "The specified Visual is not an ancestor of this visual" is obtained.

Error is also thrown whenever attempted to highlight and select multiple activities in the Designer panel.



Root Cause: The issue often arises due to missing configuration files, dll files, etc. that did not get properly installed or may have been removed due to some Antivirus/Antimalware software.



Resolution: This issue is not specific to a version of UiPath Studio.

  • Update UiPath Studio to the latest minor version of the major version.


For Ex: If the issue is seen on UiPath Studio 21.10.4, update to latest minor version 21.10.10 .


I am running the Community Edition, just updated a day or so ago, and this error has begun displaying for me.

Here’s the detail data:

Error: System.Exception: The specified Visual is not an ancestor of this Visual.
at System.Windows.Media.Visual.TrySimpleTransformToAncestor(Visual ancestor, Boolean inverse, GeneralTransform& generalTransform, Matrix& simpleTransform)
at System.Windows.Media.Visual.TransformToAncestor(Visual ancestor)
at System.Activities.Presentation.View.RubberBandSelector.Select(Boolean isCtrlKeyDown)
at System.Activities.Presentation.View.RubberBandSelector.OnScrollViewerPreviewMouseLeftButtonUp(MouseEventArgs e)
at System.Activities.Presentation.View.DesignerView.OnScrollViewerPreviewMouseLeftButtonUp(Object sender, MouseButtonEventArgs e)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
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.Input.InputManager.ProcessStagingArea()
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 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler), HResult -2146233079

image