Error when trying to select entity to create ticket

When trying to select and entity from a entity screen to create a ticket i get the follow error then samba crashes. Not sure whats causing this. Only seems to happen when custom navigation is enabled in samba.


[General Info]

Application: SambaPOS
Version: 5.1.59
Region: en
DB: SQ
Machine: PMC-SVR01
User: pmcadmin
Date: 4/20/2016
Time: 1:31 PM

User Explanation:

pmcadmin said “”

[Exception Info 1]

Top-level Exception
Type: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: Samba.Modules.EntityModule
Stack Trace: at Samba.Modules.EntityModule.EntitySelectorViewModel.OnSelectEntityExecuted(EntityScreenItemViewModel obj)
at Microsoft.Practices.Prism.Commands.DelegateCommand`1.<>c__DisplayClass6.<.ctor>b__2(Object o)
at Microsoft.Practices.Prism.Commands.DelegateCommandBase.Execute(Object parameter)
at Microsoft.Practices.Prism.Commands.DelegateCommandBase.System.Windows.Input.ICommand.Execute(Object parameter)
at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Primitives.ToggleButton.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)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at Samba.Presentation.App.Main()


[Assembly Info]

mscorlib, Version=4.0.0.0
DevExpress.Xpf.LayoutControl.v14.1, Version=14.1.11.0
System.Xml, Version=4.0.0.0
DevExpress.Xpf.Grid.v14.1, Version=14.1.11.0
System, Version=4.0.0.0
DevExpress.Xpf.Grid.v14.1.Core, Version=14.1.11.0
WindowsBase, Version=4.0.0.0
System.Xaml, Version=4.0.0.0
Samba.Domain, Version=1.0.0.0
System.Core, Version=4.0.0.0
PresentationFramework, Version=4.0.0.0
Samba.Infrastructure, Version=1.0.0.0
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
System.ComponentModel.Composition, Version=4.0.0.0
PresentationCore, Version=4.0.0.0
DevExpress.Xpf.Core.v14.1, Version=14.1.11.0
Samba.Services, Version=1.0.0.0
Samba.Presentation.Services, Version=1.0.0.0
System.Windows.Forms, Version=4.0.0.0
System.Drawing, Version=4.0.0.0
Stateless, Version=1.0.0.0
Samba.Persistance, Version=1.0.0.0
PropertyTools, Version=2012.4.14.1
Samba.Localization, Version=1.0.0.0
ReachFramework, Version=4.0.0.0
Samba.Infrastructure.Data, Version=1.0.0.0
EntityFramework, Version=6.0.0.0
FluentValidation, Version=3.4.0.0
Omu.ValueInjecter, Version=2.3.0.0
Microsoft.Practices.ServiceLocation, Version=1.0.0.0
Microsoft.CSharp, Version=4.0.0.0


[System Info]

Operating System
-Microsoft Windows 10 Pro
–CodeSet = 1252
–CSDVersion =
–CurrentTimeZone = -240
–FreePhysicalMemory = 2748492
–OSArchitecture = 64-bit
–OSLanguage = 1033
–ServicePackMajorVersion = 0
–ServicePackMinorVersion = 0
–Version = 10.0.10586

Machine
-PMC-SVR01
–Manufacturer = Microsoft Corporation
–Model = Virtual Machine
–TotalPhysicalMemory = 4294496256
–UserName =


This is possibly the same problem:

Read through there is a solution further down. Backup your database first then try the solution. If it doesn’t work let us know.

Hmm i looked in the database cant see anything that has null value under entityname so im not sure…

how about entities with blank name?

there were no entities… i cleared out the database.

LOL, then how do expect “Select Entity” to be able to function?

1 Like

sorry i mean that there is no entities in the sql table entities name like i deleted all the customer entities… so all i have as far as entities goes at the moment are Tables 1-100 but there is no data in the sql table… maybe im looking at it wrong. Ill post a screen shot in a few seconds.

if i select edit top 200 rows i do see this…

TicketEntities will be entity assignments to tickets, not the entities themselves setup in Samba

Try the Entities table (dbo.Entities) ):wink:

Does this look normal then?..

I dont have any entities without custom data so not sure what that should look like if none configured but tables look to be entity type 2 and guessing thats customers as type 1.

Show a screenshot of your entities list in settings within samba.

Looks normal.

Check your Ticket Type to ensure you do not have any Entity Types listed in there that do not exist.

So if you have no Customer Entities, or more to the point no Customers Entity Type, you need to remove the Customers Entity Type from the Entity Type List in your Ticket Type.

well im using a blank database so i havent created any yet… I do want to be able to create them…

This error only happens when i choose a table entity from the tables entity screen… weird thing is that if i go to search customer and choose search and choose a customer and then close the ticket and go back to the tables screen it then lets me choose from that screen…

What have you got in your entity types page (entity section)
There were 2 entities of type one in the list, I would have thought the entities list would have showed them at top of the list as type 1…
How did you clear the database? via SQL Managment? as database tools doesn’t remove entities…

This is what happens when i choose a table to create a ticket…

then if i choose to select a customer entity it works fine… even if i go choose a table entity after a customer entity the table selection then works…

Try this:

Remove Tables from your Ticket Type and save.

Add Tables back into your Ticket Type and save.

Also, show the settings for your Table Numbers entity Screen.