Bug: Entity Notes and Layout or Custom Screen

There appears to be a bug when there is an entity note and an entity screen View Mode is set to Layout or Custom and using Entity Buttons. When trying to display the Entity Screen, Samba will crash. It does not happen when the View Mode is set to automatic.

To re-create the bug;

  • Set the All Tables entity screen View Mode to Layout or Custom.
  • Log out and back in.
  • Add Tables to the Entity Screen using Entity Buttons (no need to create all table names, just a few.)
  • Back in Management/Entities - Add a note to a table.
  • Try to view the All Tables screen. Crash should happen.
  • Change View Mode to “Automatic” to prevent the crash.
  • Will also happen if there is a customer with a note that is selected with a table. (ticket closed and trying to view the All Tables screen.)

Please post the crash log

Here is a log file:

4/3/2022 7:46 PM
-----------------------------
[General Info]

Application: SambaPOS
Version:     5.3.6
Region:      en
DB:          SQ
Machine:     LAPPY-III
User:        bob
Date:        4/4/2022
Time:        12:46 AM

User Explanation:

bob said ""
-----------------------------

[Exception Info 1]

Top-level Exception
Type:        System.Reflection.TargetInvocationException
Message:     Exception has been thrown by the target of an invocation.
Source:      mscorlib
Stack Trace: at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   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.NullReferenceException
Message:     Object reference not set to an instance of an object.
Source:      FastButton
Stack Trace: at FastButton.Badge.OnContentChanged(Object oldContent, Object newContent)
   at System.Windows.Controls.ContentControl.OnContentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at Samba.Presentation.ClientLibrary.Modules.EntityModule.Widgets.EntityButton.EntityButtonWidgetViewModel.set_Badge(String value) in C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Presentation.ClientLibrary\Modules\EntityModule\Widgets\EntityButton\EntityButtonWidgetViewModel.cs:line 150
   at Samba.Presentation.ClientLibrary.Modules.EntityModule.Widgets.EntityButton.EntityButtonWidgetViewModel.InternalRefresh() in C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Presentation.ClientLibrary\Modules\EntityModule\Widgets\EntityButton\EntityButtonWidgetViewModel.cs:line 74
   at Samba.Presentation.Common.Widgets.WidgetViewModel.Refresh()
   at Samba.Presentation.Controls.UIControls.DiagramCanvas.AddControl(IDiagram buttonHolder, InkCanvas parentControl)
   at Samba.Presentation.Controls.UIControls.DiagramCanvas.SourceChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.Controls.InkCanvas.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp, Boolean preserveCurrentValue)
   at System.Windows.Data.BindingExpressionBase.Invalidate(Boolean isASubPropertyChange)
   at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
   at System.Windows.Data.BindingExpression.ScheduleTransfer(Boolean isASubPropertyChange)
   at MS.Internal.Data.ClrBindingWorker.NewValueAvailable(Boolean dependencySourcesChanged, Boolean initialValue, Boolean isASubPropertyChange)
   at MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32 k, ICollectionView collectionView, Object newValue, Boolean isASubPropertyChange)
   at MS.Internal.Data.ClrBindingWorker.OnSourcePropertyChanged(Object o, String propName)
   at MS.Internal.Data.PropertyPathWorker.OnPropertyChanged(Object sender, PropertyChangedEventArgs e)
   at System.Windows.WeakEventManager.ListenerList`1.DeliverEvent(Object sender, EventArgs e, Type managerType)
   at System.ComponentModel.PropertyChangedEventManager.OnPropertyChanged(Object sender, PropertyChangedEventArgs args)
   at Microsoft.Practices.Prism.ViewModel.NotificationObject.RaisePropertyChanged(String propertyName)
   at Microsoft.Practices.Prism.ViewModel.NotificationObject.RaisePropertyChanged[T](Expression`1 propertyExpression)
   at Samba.Presentation.ClientLibrary.Modules.EntityModule.EntityDashboardViewModel.Refresh(EntityScreen entityScreen, OperationRequest`1 currentOperationRequest) in C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Presentation.ClientLibrary\Modules\EntityModule\EntityDashboardViewModel.cs:line 112
   at Samba.Presentation.ClientLibrary.Modules.EntityModule.EntitySwitcherViewModel.ActivateDashboard(EntityScreen entityScreen) in C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Presentation.ClientLibrary\Modules\EntityModule\EntitySwitcherViewModel.cs:line 286
   at Samba.Presentation.ClientLibrary.Modules.EntityModule.EntitySwitcherViewModel.ActivateEntityScreen(EntityScreen entityScreen) in C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Presentation.ClientLibrary\Modules\EntityModule\EntitySwitcherViewModel.cs:line 260
   at Samba.Presentation.ClientLibrary.Modules.EntityModule.EntitySwitcherViewModel.<.ctor>b__27_2(EventParameters`1 x) in C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Presentation.ClientLibrary\Modules\EntityModule\EntitySwitcherViewModel.cs:line 98
   at Microsoft.Practices.Prism.Events.EventSubscription`1.InvokeAction(Action`1 action, TPayload argument)
   at Microsoft.Practices.Prism.Events.EventSubscription`1.<>c__DisplayClass2.<GetExecutionStrategy>b__0(Object[] arguments)
   at Microsoft.Practices.Prism.Events.EventBase.InternalPublish(Object[] arguments)
   at Microsoft.Practices.Prism.Events.CompositePresentationEvent`1.Publish(TPayload payload)
   at Samba.Presentation.Services.Common.ExtensionMethods.Publish[TEventsubject](TEventsubject eventArgs, String eventTopic, Action expectedAction)

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

[Assembly Info]

mscorlib, Version=4.0.0.0
System, Version=4.0.0.0
Samba.Services, Version=5.3.7816.18491
Samba.Domain, Version=5.3.7816.18489
Samba.Infrastructure.Data, Version=5.3.7816.18489
System.ComponentModel.Composition, Version=4.0.0.0
Samba.Presentation.Services, Version=5.3.7816.18492
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.3.7816.18485
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.3.7816.18490
Stateless, Version=1.0.0.0
PropertyTools, Version=2012.4.14.1
Samba.Localization, Version=5.3.7816.18487
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

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

[System Info]

Operating System
-Microsoft Windows 10 Pro
--CodeSet = 1252
--CSDVersion = 
--CurrentTimeZone = -300
--FreePhysicalMemory = 3964440
--OSArchitecture = 64-bit
--OSLanguage

I can confirm, I just recreated it follow exactly the same steps

v5.3.6

1 Like