Regex Expressions Editor fails to open and crashes UiPath Studio

When Edit button is clicked, an error message (below) asks for UiPath Studio restart. If accepted, Studio keeps restarting and crashing in a never ending loop until killed via Task Manager. It is having issues processing the Regex syntax “\s” for some reason. If I remove the Regex before clicking the Edit button, the Regex window opens up, but all of the Regex steps are gone!

Studio Version:

Package Stack:

Error Message:

Error: System.ArgumentException: parsing “FORM\s(10-)(.)$” - Unrecognized escape sequence \s.
at UiPath.SmartData.WPF.RelayCommand.Execute(Object parameter)
at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.UIElement.OnMouseLeftButtonUpThunk(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.OnMouseUpThunk(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 -2147024809

@AndyMenon - this happens everytime once we go back and edit and I have reported it so many times in the last week…this very irritating bug…

it will thrown an error stating \d or \s etc etc is invalid…but these are very basic regex expressions

Workaround: try your regex in regexstorm or anything editor of your choice and just paste your pattern in the expression tab without clicking the edit…

2 Likes

Agreed. I have an older version of this project that was developed back in 2020. I never had a single issue with the Regex Editor.

This is a basic Regex expression that has been demonstrated in the academy course.

Question is, why is it crashing now? And why should it crash? :thinking:

Thanks for confirming that this is indeed a bug!

I did this and the Regex Editor opened up without a peep!

But the Regex is pretty useless if I put these start and end identifiers, but prevents that crazy error message.

Hi @AndyMenon

Could you confirm whether IntelligentOCR package 4.11.1-preview fixes this for you? It should.

Sorry @AndyMenon for hijacking your spot…

@loginerror - Not working for me , still the same error…

image

@AndyMenon - Please try and let me know, if its works for you…

1 Like

I have upgraded all my packages and not just the DU related packages to their latest versions. It does not make any difference.

However, if I simply put a “/” character in front of the RegEx and then click the Edit button, the RegEx editor opens up, but the original line-by-line sections of the expression don’t show up. Instead, only one line categorizing the expression as Advanced shows the final expression.

thanks

2 Likes

Correct, I double checked and indeed my question was asked to early. The fix is already being worked on though, and it will be released in one of the next IntelligentOCR package versions. 4.11.1-preview doesn’t have it just yet though.

2 Likes