Crash on Entity Screen

Can someone help me find the source of this issue?

Jul-29-2022 15:45
-----------------------------
[General Info]

Application: SambaPOS
Version:     5.5.0
Region:      en
DB:          SQ
Machine:     DESKTOP-BFRGQL8
User:        ARIAN
Date:        Jul-29-2022
Time:        13:45

User Explanation:

ARIAN said ""
-----------------------------

[Exception Info 1]

Top-level Exception
Type:        System.Windows.Markup.XamlParseException
Message:     Initialization of 'DevExpress.Xpf.Editors.TextEdit' threw an exception.
Source:      PresentationFramework
Stack Trace: at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlReader templateReader, XamlObjectWriter currentWriter)
   at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlObjectWriter objectWriter)
   at System.Windows.FrameworkTemplate.LoadOptimizedTemplateContent(DependencyObject container, IComponentConnector componentConnector, IStyleConnector styleConnector, List`1 affectedChildren, UncommonField`1 templatedNonFeChildrenField)
   at System.Windows.FrameworkTemplate.LoadContent(DependencyObject container, List`1 affectedChildren)
   at System.Windows.StyleHelper.ApplyTemplateContent(UncommonField`1 dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate)
   at System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField`1 templateDataField, FrameworkElement container)
   at System.Windows.FrameworkElement.ApplyTemplate()
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.StackPanel.StackMeasureHelper(IStackMeasure measureElement, IStackMeasureScrollData scrollData, Size constraint)
   at System.Windows.Controls.StackPanel.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ItemsPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Documents.AdornerDecorator.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Window.MeasureOverrideHelper(Size constraint)
   at System.Windows.Window.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   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.Media.MediaContext.Resize(ICompositionTarget resizedCompositionTarget)
   at System.Windows.Interop.HwndTarget.OnResize()
   at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(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)

Inner Exception 1
Type:        System.ArgumentException
Message:     syntax error
Source:      DevExpress.Data.v17.2
Stack Trace: at DevExpress.Data.Mask.RegExpParser.yyerror(String message, String[] expected)
   at DevExpress.Data.Mask.RegExpParser.yyparse(yyInput yyLex)
   at DevExpress.Data.Mask.RegExpParser.Parse(TextReader reader, Boolean reverseAutomate, CultureInfo parseCulture)
   at DevExpress.Data.Mask.RegExpParser.Parse(String regExp, Boolean reverseAutomate, CultureInfo parseCulture)
   at DevExpress.Data.Mask.RegExpMaskManagerCore..ctor(String regExp, Boolean reverseDfa, Boolean isAutoComplete, Boolean isOptimistic, Boolean showPlaceHolders, Char anySymbolPlaceHolder, CultureInfo managerCultureInfo)
   at DevExpress.Xpf.Editors.TextInputMaskSettings.CreateDefaultMaskManager()
   at DevExpress.Xpf.Editors.TextInputMaskSettings.DevExpress.Xpf.Editors.IMaskManagerProvider.CreateNew()
   at DevExpress.Xpf.Editors.WpfMaskManager.Initialize()
   at DevExpress.Xpf.Editors.WpfMaskManager..ctor(IMaskManagerProvider maskManagerProvider)
   at DevExpress.Xpf.Editors.TextInputMaskSettings.UpdateMaskManager()
   at DevExpress.Xpf.Editors.TextInputMaskSettings.AssignProperties()
   at DevExpress.Xpf.Editors.TextInputSettingsBase.AssignEditorInternal()
   at DevExpress.Xpf.Editors.TextInputSettingsBase..ctor(TextEditBase editor)
   at DevExpress.Xpf.Editors.TextInputMaskSettings..ctor(TextEditBase editor)
   at DevExpress.Xpf.Editors.TextEdit.CreateTextInputSettings()
   at DevExpress.Xpf.Editors.TextEditBase.UpdateTextInputSettings()
   at DevExpress.Xpf.Core.Locker.DoLockedAction(Action action)
   at DevExpress.Xpf.Editors.TextEditBase.EndInitInternal(Boolean callBase)
   at DevExpress.Xpf.Editors.BaseEdit.DevExpress.Xpf.Editors.IBaseEdit.EndInit(Boolean callBase, Boolean shouldSync)
   at DevExpress.Xpf.Editors.BaseEdit.EndInit()
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.InitializationGuard(XamlType xamlType, Object obj, Boolean begin)

-----------------------------

[Assembly Info]

mscorlib, Version=4.0.0.0
System, Version=4.0.0.0
Samba.Services, Version=5.5.8192.32627
Samba.Domain, Version=5.5.8192.32625
Samba.Infrastructure.Data, Version=5.5.8192.32625
System.ComponentModel.Composition, Version=4.0.0.0
Samba.Presentation.Services, Version=5.5.8192.32630
System.Core, Version=4.0.0.0
PresentationCore, Version=4.0.0.0
WindowsBase, Version=4.0.0.0
PresentationFramework, Version=4.0.0.0
DevExpress.Xpf.LayoutControl.v17.2, Version=17.2.13.0
System.Xml, Version=4.0.0.0
DevExpress.Xpf.Grid.v17.2, Version=17.2.13.0
DevExpress.Xpf.Grid.v17.2.Core, Version=17.2.13.0
System.Xaml, Version=4.0.0.0
Samba.Infrastructure, Version=5.5.8192.32621
Microsoft.Practices.Prism, Version=4.0.0.0
System.Runtime.Serialization, Version=4.0.0.0
Microsoft.Practices.Prism.MefExtensions, Version=4.0.0.0
DevExpress.Xpf.Core.v17.2, Version=17.2.13.0
System.Windows.Forms, Version=4.0.0.0
System.Drawing, Version=4.0.0.0
Samba.Persistance, Version=5.5.8192.32626
Stateless, Version=1.0.0.0
PropertyTools, Version=2012.4.14.1
Samba.Localization, Version=5.3.8192.32622
ReachFramework, Version=4.0.0.0
EntityFramework, Version=6.0.0.0
FluentValidation, Version=3.4.0.0
NCalc, Version=1.3.8.0
Microsoft.CSharp, Version=4.0.0.0
Omu.ValueInjecter, Version=2.3.0.0
Microsoft.Practices.ServiceLocation, Version=1.0.0.0
DevExpress.Data.v17.2, Version=17.2.13.0
WindowsInput, Version=1.0.4.0

The way I get this error is

  1. Open Custom Entity Screen
  2. Select one of the items from the report widget thats listed as [#Report]
  3. Press Automation Command
  4. Crash

Hello @Posflow,

You can have a look at below topic for similar issue;

https://forum.sambapos.com/t/crash-when-trying-to-display-a-prompt/18958

@Nizam you were right, the issue was in the regex mask.

I changed it from this

Description=[?Description;[a-zA-Z0-9!@#$%^&*()_+\-=\[\]{};':\\|,.<>\/?]{20,250};;]

to this

Description=[?Description;[a-zA-Z0-9@#$%&()_+-=]{20,250};;]

And it stopped crashing, I am guessing it was either [] or ? or ; that was causing the crash. Thanks!

1 Like

It was probably the colon

1 Like