IF Show Else button throws an error while in Action of State Machine

Hi @loginerror,

We noticed a bug today and thought will inform here.
Studio Versions : 2021.4.3 and 2021.4.4 both have this bug.

We use state-machines in Process.xaml file in the REFramework. When we want to populated the Action block in the Transition with a IF condition and press on Show Else we get this error message and are not able to populate the logic in the Else block.

We have tried with and without the nested sequence activity. In both cases, we get this error message.

Details from error message (Copy to Clipboard):

21.4.3+Branch.master.Sha.7d66317b828533c43b8fc299ec1cfdc22a138bc2

'System.Windows.Documents.Hyperlink' is not a Visual or Visual3D.

Error: System.Exception: 'System.Windows.Documents.Hyperlink' is not a Visual or Visual3D.
   at MS.Internal.Media.VisualTreeUtils.AsVisual(DependencyObject element, Visual& visual, Visual3D& visual3D)
   at MS.Internal.Media.VisualTreeUtils.AsNonNullVisual(DependencyObject element, Visual& visual, Visual3D& visual3D)
   at System.Windows.Media.VisualTreeHelper.GetParent(DependencyObject reference)
   at System.Activities.Presentation.Internal.PropertyEditing.VisualTreeUtils.FindVisualAncestor[T](DependencyObject child)
   at System.Activities.Core.Presentation.ReorderableListEditor.OnListBoxPreviewGotKeyboardFocus(Object sender, KeyboardFocusChangedEventArgs e)
   at System.Windows.Input.KeyboardFocusChangedEventArgs.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.ContentElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   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.ContentElement.Focus()
   at System.Windows.Documents.Hyperlink.OnMouseLeftButtonDown(Object sender, MouseButtonEventArgs e)
   at System.Windows.Documents.Hyperlink.OnMouseLeftButtonDown(MouseButtonEventArgs e)
   at System.Windows.UIElement.OnMouseLeftButtonDownThunk(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.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   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 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler), HResult -2146233079

Hi @jeevith

Could you maybe include the dependencies of your project? A sample, dummy project that reproduces the issue with minimum amount of activities would work as well.

Hi @loginerror,

Even a simple REFramework templat file with limited dependencies on 21.4.3 has this bug.

Bug in
Process.xamlS—>StateMachine—>State 1 to End Transition (T1)—> Action—>If—>Show Else

Here is a sample file:
BugReportingSample.zip (1013.3 KB)

Thanks! I moved your post to our feedback category, tagged it as a bug and sent it to our bug tracker for consideration.

I’ll keep updating this topic when updates become available :slight_smile:

EDIT.
It looks like it was already known and the fix is planned in a future version.

1 Like

Hello,

This is a known issue and our team is working on fixing this issue and fix will be released soon, please subscribe to our release notes for latest product updates and bugfixes.

Workaround -
Create a separate sequence or you can use an existing one.
Drag if activity - expand else block and provide any activity in else block - copy this modified if activity and paste it under Action block in system exception.

Hope this helps :slightly_smiling_face:

Hello, any updates on this one? I am still receiving the same issue.
image

Hi @Lee_Phay_Kho

The fix to the issue is not yet released. In the meantime, please use the workaround posted above: