# Sambapos crashes when looking up a table

**URL:** <https://forum.sambapos.com/t/sambapos-crashes-when-looking-up-a-table/6993>\
**Category:** V5 Question\
**Created:** [September 10, 2015, 5:04am UTC](https://forum.sambapos.com/t/sambapos-crashes-when-looking-up-a-table/6993 "2015-09-10T05:04:47Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![rightguys](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/r/ad7895/32.png) [@rightguys](https://forum.sambapos.com/u/rightguys)\
**Post date:** [September 10, 2015, 5:04am UTC](https://forum.sambapos.com/t/sambapos-crashes-when-looking-up-a-table/6993/1 "2015-09-10T05:04:47Z")

</div>

On Computer #1 (server computer), I log in as User Employee # 1. I go to Table #1 and create an order. On Computer #2, I use RDP and I log in as User Employee #2. On Computer #2, I look up Table #1, and close it.Right after that, SambaPOS 5 crashes. I receive this crash message:

```
-----------------------------
[General Info]

Application: SambaPOS
Version: 5.1.47
Region: en
DB: SQ
Machine: KLSERVER
User: k&l employee 2
Date: 9/10/2015
Time: 4:55 AM

User Explanation:

k&l employee 2 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.Reflection.RuntimeMethodInfo.UnsafeInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(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 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, 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.Threading.DispatcherOperation.Wait(TimeSpan timeout)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherOperation operation, CancellationToken cancellationToken, TimeSpan timeout)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at Samba.Presentation.Services.Common.ExtensionMethods.PublishEvent[TEventSubject](TEventSubject eventArgs, String eventTopic, Boolean wait)
   at Samba.Presentation.Common.Services.ApplicationState.<>c.<NotifyEvent>b__99_0(ActionData x)
   at Samba.Services.Implementations.AutomationModule.ActionDataBuilder.InvokeFor(Action`1 dataAction)
   at CallSite.Target(Closure , CallSite , Object , Action`1 )
   at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2[T0,T1](CallSite site, T0 arg0, T1 arg1)
   at Samba.Services.Implementations.AutomationModule.RuleExecutor.ExecuteWithoutLogging(Object dataParameter, Action`1 dataAction)
   at Samba.Services.Implementations.AutomationModule.RuleExecutor.ExecuteWith(Object dataParameter, Action`1 dataAction)
   at Samba.Services.Implementations.AutomationModule.NotificationService.NotifyEvent(String eventName, Object dataParameter, Int32 terminalId, Int32 departmentId, Int32 userRoleId, Int32 ticketTypeId, Action`1 dataAction)
   at Samba.Presentation.Common.Services.ApplicationState.NotifyEvent(String eventName, Object dataObject)
   at Samba.Modules.PosModule.TicketViewModel.ExecuteAutomationCommand(String automationCommandName, String automationCommandValue, String nextCommandValue, Boolean executeOnce, Boolean clearSelection)
   at Samba.Modules.PosModule.TicketViewModel.ExecuteAutomationCommand(AutomationCommand automationCommand, String selectedValue, String nextValue)
   at Samba.Modules.PosModule.TicketViewModel.OnExecuteAutomationCommand(CommandContainerButton 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 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, 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.Threading.Dispatcher.Run()
   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()

Inner Exception 1
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.Reflection.RuntimeMethodInfo.UnsafeInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(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 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, 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.Threading.DispatcherOperation.Wait(TimeSpan timeout)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherOperation operation, CancellationToken cancellationToken, TimeSpan timeout)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at Samba.Presentation.Services.Common.ExtensionMethods.PublishEvent[TEventSubject](TEventSubject eventArgs, String eventTopic, Boolean wait)
   at Samba.Modules.TicketModule.ActionProcessors.CloseActiveTicket.Process(ActionData actionData)
   at Samba.Services.Common.RuleActionTypeRegistry.ProcessAction(String actionType, ActionData actionData)
   at Samba.Services.Implementations.AutomationModule.AutomationService.ProcessAction(String actionType, ActionData actionData)
   at Samba.Modules.AutomationModule.AutomationModule.<OnInitialization>b__5_0(EventParameters`1 x)
   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)

Inner Exception 2
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.Reflection.RuntimeMethodInfo.UnsafeInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(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 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, 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.Threading.DispatcherOperation.Wait(TimeSpan timeout)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherOperation operation, CancellationToken cancellationToken, TimeSpan timeout)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at Samba.Presentation.Services.Common.ExtensionMethods.PublishEvent[TEventSubject](TEventSubject eventArgs, String eventTopic, Boolean wait)
   at Samba.Presentation.Common.Services.ApplicationState.<>c.<NotifyEvent>b__99_0(ActionData x)
   at Samba.Services.Implementations.AutomationModule.ActionDataBuilder.InvokeFor(Action`1 dataAction)
   at CallSite.Target(Closure , CallSite , Object , Action`1 )
   at Samba.Services.Implementations.AutomationModule.RuleExecutor.ExecuteWithoutLogging(Object dataParameter, Action`1 dataAction)
   at Samba.Services.Implementations.AutomationModule.RuleExecutor.ExecuteWith(Object dataParameter, Action`1 dataAction)
   at Samba.Services.Implementations.AutomationModule.NotificationService.NotifyEvent(String eventName, Object dataParameter, Int32 terminalId, Int32 departmentId, Int32 userRoleId, Int32 ticketTypeId, Action`1 dataAction)
   at Samba.Presentation.Common.Services.ApplicationState.NotifyEvent(String eventName, Object dataObject)
   at Samba.Modules.PosModule.PosViewModel.CloseTicket()
   at Samba.Modules.PosModule.PosViewModel.OnTicketEvent(EventParameters`1 obj)
   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)

Inner Exception 3
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.Reflection.RuntimeMethodInfo.UnsafeInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(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 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, 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.Threading.DispatcherOperation.Wait(TimeSpan timeout)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherOperation operation, CancellationToken cancellationToken, TimeSpan timeout)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at Samba.Presentation.Services.Common.ExtensionMethods.PublishEvent[TEventSubject](TEventSubject eventArgs, String eventTopic, Boolean wait)
   at Samba.Modules.PosModule.PosViewModel.DisplayMenuScreen()
   at Samba.Modules.PosModule.PosViewModel.OnTicketEvent(EventParameters`1 obj)
   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)

Inner Exception 4
Type: System.Reflection.TargetInvocationException
Message: Property accessor 'PaidItems' on object 'System.Data.Entity.DynamicProxies.Ticket_C4F7BF9F82A9ACE966ED544533824DD633FA57B65E767FB8530A67257524A29F' threw the following exception:'The ObjectContext instance has been disposed and can no longer be used for operations that require a connection.'
Source: System
Stack Trace: at System.ComponentModel.ReflectPropertyDescriptor.GetValue(Object component)
   at Omu.ValueInjecter.ConventionInjection.Inject(Object source, Object target)
   at Omu.ValueInjecter.ValueInjection.Map(Object source, Object target)
   at Omu.ValueInjecter.StaticValueInjecter.InjectFrom[T](Object target, Object[] source)
   at Samba.Infrastructure.Data.Serializer.ObjectCloner.Clone2[T](T item)
   at Samba.Services.Implementations.PrinterModule.TicketPrinter.Print()
   at Samba.Services.Implementations.PrinterModule.PrinterService.PrintTicket(Ticket ticket, PrintJob printJob, Func`2 orderSelector, Boolean highPriority)
   at Samba.Modules.PrinterModule.ActionProcessors.ExecutePrintJob.<>c __DisplayClass6_0.<Process>b__ 0()
   at Samba.Modules.PrinterModule.ActionProcessors.ExecutePrintJob.ExecuteByCopies(Int32 copies, Action action)
   at Samba.Modules.PrinterModule.ActionProcessors.ExecutePrintJob.Process(ActionData actionData)
   at Samba.Services.Common.RuleActionTypeRegistry.ProcessAction(String actionType, ActionData actionData)
   at Samba.Services.Implementations.AutomationModule.AutomationService.ProcessAction(String actionType, ActionData actionData)
   at Samba.Modules.AutomationModule.AutomationModule.<OnInitialization>b__5_0(EventParameters`1 x)
   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)

Inner Exception 5
Type: System.ObjectDisposedException
Message: The ObjectContext instance has been disposed and can no longer be used for operations that require a connection.
Source: EntityFramework
Stack Trace: at System.Data.Entity.Core.Objects.ObjectContext.get_Connection()
   at System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
   at System.Data.Entity.Core.Objects.ObjectQuery`1.Execute(MergeOption mergeOption)
   at System.Data.Entity.Core.Objects.DataClasses.EntityCollection`1.Load(List`1 collection, MergeOption mergeOption)
   at System.Data.Entity.Core.Objects.DataClasses.EntityCollection`1.Load(MergeOption mergeOption)
   at System.Data.Entity.Core.Objects.DataClasses.RelatedEnd.DeferredLoad()
   at System.Data.Entity.Core.Objects.Internal.LazyLoadBehavior.LoadProperty[TItem](TItem propertyValue, String relationshipName, String targetRoleName, Boolean mustBeNull, Object wrapperObject)
   at System.Data.Entity.Core.Objects.Internal.LazyLoadBehavior.<>c __DisplayClass7`2.<GetInterceptorDelegate>b__ 1(TProxy proxy, TItem item)
   at System.Data.Entity.DynamicProxies.Ticket_C4F7BF9F82A9ACE966ED544533824DD633FA57B65E767FB8530A67257524A29F.get_PaidItems()

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

[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
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
Samba.Persistance, Version=1.0.0.0

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

[System Info]

Operating System
-Microsoft Windows Server 2012 R2 Standard
--CodeSet = 1252
--CSDVersion = 
--CurrentTimeZone = -240
--FreePhysicalMemory = 5000420
--OSArchitecture = 64-bit
--OSLanguage = 1033
--ServicePackMajorVersion = 0
--ServicePackMinorVersion = 0
--Version = 6.3.9600

Machine
-KLSERVER
--Manufacturer = To Be Filled By O.E.M.
--Model = To Be Filled By O.E.M.
--TotalPhysicalMemory = 8511815680
--UserName = KLDELI\K&L employee

```

Edit: When I created the SQL server, I made User Employee #1 and User Employee #2 SQL server administrators, if that helps.

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [September 10, 2015, 10:55am UTC](https://forum.sambapos.com/t/sambapos-crashes-when-looking-up-a-table/6993/2 "2015-09-10T10:55:39Z")

</div>

Im not going to even try and decipher the error code but a couple of questions;

- When you say computer 2 you use RDP, can you elaborate? why would you  
use RDP on computer 2? why not install samba locally?

- Is it only if you open/close the table with a different user? ie if  
employee 1 used terminal 2 to open the table does it crash on close?

- Have you done any customization in the default ticket close rule? Or  
added and other ticket close rules?

---

<div class="post-metadata">

**Author:** ![madiha](https://forum.sambapos.com/user_avatar/forum.sambapos.com/madiha/32/13950_2.png) [@madiha](https://forum.sambapos.com/u/madiha)\
**Post date:** [September 10, 2015, 11:57am UTC](https://forum.sambapos.com/t/sambapos-crashes-when-looking-up-a-table/6993/3 "2015-09-10T11:57:09Z")

</div>

are both user Employee #1 and Employee#2 using table#1 simoultaneously?

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [September 10, 2015, 12:05pm UTC](https://forum.sambapos.com/t/sambapos-crashes-when-looking-up-a-table/6993/4 "2015-09-10T12:05:13Z")

</div>

> [@madiha](#):
>
> are both user Employee #1 and Employee#2 using table#1 simultaneously?

In theory in cases like this where table is open on two terminals I believe the expected behavior should be the changes made by the first user to logout are saved and the second user gets a message saying something like the ticket has been altered elsewhere. Although am not sure off the top of my head if the seconds users orders are canceled or samba does its best to merge their changes too.

I did have a go at a setup to prevent a ticket being opened a second time while the first ‘session’ was still open;  
[http://forum.sambapos.com/t/tutorial-prevent-ticket-being-opened-by-multiple-users-terminals/5290?u=jtrtech](http://forum.sambapos.com/t/tutorial-prevent-ticket-being-opened-by-multiple-users-terminals/5290)  
Although this was a while ago.  
I do plan to revamp this setup now I have more Samba experience and newer version of V5 as that was done on quite an early beta version, hopefulyl might be able to clean up a bit.

---

<div class="post-metadata">

**Author:** ![madiha](https://forum.sambapos.com/user_avatar/forum.sambapos.com/madiha/32/13950_2.png) [@madiha](https://forum.sambapos.com/u/madiha)\
**Post date:** [September 10, 2015, 12:12pm UTC](https://forum.sambapos.com/t/sambapos-crashes-when-looking-up-a-table/6993/5 "2015-09-10T12:12:23Z")

</div>

ya i saw your tutorial for deadlock prevention and emre also mentioned he will prevent this to happen in v5.

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [September 10, 2015, 12:13pm UTC](https://forum.sambapos.com/t/sambapos-crashes-when-looking-up-a-table/6993/6 "2015-09-10T12:13:16Z")

</div>

> [@madiha](#):
>
> emre also mentioned he will prevent this to happen in v5.

oooo, didnt see that mentioned, havn’t tried 😄

---

<div class="post-metadata">

**Author:** ![madiha](https://forum.sambapos.com/user_avatar/forum.sambapos.com/madiha/32/13950_2.png) [@madiha](https://forum.sambapos.com/u/madiha)\
**Post date:** [September 10, 2015, 12:20pm UTC](https://forum.sambapos.com/t/sambapos-crashes-when-looking-up-a-table/6993/7 "2015-09-10T12:20:16Z")

</div>

[link to his reference](http://forum.sambapos.com/t/issue-get-error-2-or-more-same-sequence-elements-contained/6203/15?u=madiha)

---

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [September 10, 2015, 12:24pm UTC](https://forum.sambapos.com/t/sambapos-crashes-when-looking-up-a-table/6993/8 "2015-09-10T12:24:48Z")

</div>

@rightguys This is an already fixed issue but seems like you found a case that reproduces it. That relates with some performance optimizations so I’ve secured it not to happen again. That will work fine on next (.49) update.

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [September 10, 2015, 12:26pm UTC](https://forum.sambapos.com/t/sambapos-crashes-when-looking-up-a-table/6993/9 "2015-09-10T12:26:28Z")

</div>

That reference was to preventing duplicate discounts, doesn’t prevent a ticket being opened at two terminals at the same time.  
Now I am more familiar with ticket/entity states I will probably try and work in a ‘Active Ticket’ state rather than using program settings.

---

<div class="post-metadata">

**Author:** ![madiha](https://forum.sambapos.com/user_avatar/forum.sambapos.com/madiha/32/13950_2.png) [@madiha](https://forum.sambapos.com/u/madiha)\
**Post date:** [September 10, 2015, 1:26pm UTC](https://forum.sambapos.com/t/sambapos-crashes-when-looking-up-a-table/6993/10 "2015-09-10T13:26:16Z")

</div>

oh is it i thought it will do both 🙂

---

<div class="post-metadata">

**Author:** ![rightguys](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/r/ad7895/32.png) [@rightguys](https://forum.sambapos.com/u/rightguys)\
**Post date:** [September 10, 2015, 1:50pm UTC](https://forum.sambapos.com/t/sambapos-crashes-when-looking-up-a-table/6993/11 "2015-09-10T13:50:27Z")

</div>

So, can I do anything on my end to fix this? Like JTRTech said, I did make custom Closing Ticket Rules that might be the problem (probably isn’t though)

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [September 10, 2015, 2:04pm UTC](https://forum.sambapos.com/t/sambapos-crashes-when-looking-up-a-table/6993/12 "2015-09-10T14:04:36Z")

</div>

Emre said he knew what the issue was and was related to some other updated he made and has corrected the issue in .49  
If you want to show your close ticket rules can try and see if any issues with it but emre seems to know what the issue is from the crash report, and if it was a rule issue he would have said.

---

<div class="post-metadata">

**Author:** ![Jesse](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jesse/32/61493_2.png) [@Jesse](https://forum.sambapos.com/u/Jesse)\
**Post date:** [September 10, 2015, 2:14pm UTC](https://forum.sambapos.com/t/sambapos-crashes-when-looking-up-a-table/6993/13 "2015-09-10T14:14:49Z")

</div>

Until next version make sure you close ticket before opening it on another terminal.

---

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [September 10, 2015, 2:48pm UTC](https://forum.sambapos.com/t/sambapos-crashes-when-looking-up-a-table/6993/14 "2015-09-10T14:48:47Z")

</div>

I’ve released 5.1.49 here

> [@SambaPOS 5.1.48 - 5.1.49 features](http://forum.sambapos.com/t/sambapos-5-1-48-5-1-49-features/6999):
>
> 5.1.49 Download: [http://sambapos.com/?wpfb\_dl=130](http://sambapos.com/?wpfb_dl=130) I’m releasing 5.1.49 earlier than planned to fix that issue ##New 5.1.49 Features Data Export configuration accepts file name templates. If I use star character (\*) as a file name placeholder, default folder and default extension will determined from template. For example: If I configure file name as C:\Users\Emre\Documents\SambaPOS5\*.xml Save File Dialog will appear as… ##New 5.1.48 features Hide Header setting added to Navi…

---

<div class="post-metadata">

**Author:** ![rightguys](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/r/ad7895/32.png) [@rightguys](https://forum.sambapos.com/u/rightguys)\
**Post date:** [September 10, 2015, 7:59pm UTC](https://forum.sambapos.com/t/sambapos-crashes-when-looking-up-a-table/6993/15 "2015-09-10T19:59:40Z")

</div>

> [@Jesse](#):
>
> Until next version make sure you close ticket before opening it on another terminal.

I closed the ticket, then opened the same ticket on the other computer and it crashed. ☹

> [@emre](#):
>
> I’ve released 5.1.49 here
> 
> [SambaPOS 5.1.48 - 5.1.49 features](http://forum.sambapos.com/t/sambapos-5-1-48-5-1-49-features/6999)

Wow thank you so much. I honestly love the fast support. I will give it a try tonight.

---

<div class="post-metadata">

**Author:** ![rightguys](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/r/ad7895/32.png) [@rightguys](https://forum.sambapos.com/u/rightguys)\
**Post date:** [September 10, 2015, 9:57pm UTC](https://forum.sambapos.com/t/sambapos-crashes-when-looking-up-a-table/6993/16 "2015-09-10T21:57:34Z")

</div>

> [@JTRTech](#):
>
> - When you say computer 2 you use RDP, can you elaborate? why would you  
> use RDP on computer 2? why not install samba locally?

Wait, so you’re saying that I don’t have to RDP into my server computer. The Computer #2 can have SambaPOS 5 installed locally and it will share information with Computer #1?  
I’m still very new to SQL Express.

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [September 10, 2015, 10:08pm UTC](https://forum.sambapos.com/t/sambapos-crashes-when-looking-up-a-table/6993/17 "2015-09-10T22:08:09Z")

</div>

Samba is windows app, you can set the data connection string to look to the sql server,  
Look up the sql tutorial, explains all 🙂

---

<div class="post-metadata">

**Author:** ![rightguys](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/r/ad7895/32.png) [@rightguys](https://forum.sambapos.com/u/rightguys)\
**Post date:** [September 10, 2015, 10:17pm UTC](https://forum.sambapos.com/t/sambapos-crashes-when-looking-up-a-table/6993/18 "2015-09-10T22:17:55Z")

</div>

Lol, was there a point in buying Windows Server 2012 OS?

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [September 10, 2015, 10:21pm UTC](https://forum.sambapos.com/t/sambapos-crashes-when-looking-up-a-table/6993/19 "2015-09-10T22:21:24Z")

</div>

Personally, have done about 25 samba installs with about 50 terminals, from singles to 4 terminals.  
I have never used more than a core2duo won 7 pro pc 4gb ram with that machine being one of the 4 terminals and never had any issues.  
You probably could have got away with not having server windows yes but heinsight is fabulous thing 😄  
Windows server is overkill for a small setup.  
If I was doing more than 6-7 terminals I might consider it but more likely just use a more powerful machine and have it dedicated rather than doubling as a terminal .

---

<div class="post-metadata">

**Author:** ![Jesse](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jesse/32/61493_2.png) [@Jesse](https://forum.sambapos.com/u/Jesse)\
**Post date:** [September 10, 2015, 10:33pm UTC](https://forum.sambapos.com/t/sambapos-crashes-when-looking-up-a-table/6993/20 "2015-09-10T22:33:19Z")

</div>

> [@rightguys](#):
>
> Lol, was there a point in buying Windows Server 2012 OS?

You will get better performance from SQL Express. No technically you did not need to do that but if you already have it then you could benefit from better performance. There is no need to run RDP unless you plan to use non windows tablets. Non windows tablets are typically more expensive for what you get. Additionally if you run rdp you have to purchase more licenses for RDP Machines. This means more cost. Its better to just get a high performance network setup and use local installs connected to the SQL Server

[Next page](https://forum.sambapos.com/t/sambapos-crashes-when-looking-up-a-table/6993.md?page=2)
