Sambapos stopped working. No log. Help me please

This happens on another system, I don’t know what happened all of sudden

Application: SambaPOS
Version: 5.2.16
Region: en
DB: SQ
Machine: SHOALACOUNTER
User: SHOALA
Date: 13/01/2019
Time: 20:27

User Explanation:

SHOALA 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)

Inner Exception 1
Type: System.InvalidOperationException
Message: The relationship between the two objects cannot be defined because they are attached to different ObjectContext objects.
Source: EntityFramework
Stack Trace: at System.Data.Entity.Core.Objects.DataClasses.RelatedEnd.ValidateContextsAreCompatible(RelatedEnd targetRelatedEnd)
at System.Data.Entity.Core.Objects.DataClasses.RelatedEnd.Add(IEntityWrapper wrappedTarget, Boolean applyConstraints, Boolean addRelationshipAsUnchanged, Boolean relationshipAlreadyExists, Boolean allowModifyingOtherEndOfRelationship, Boolean forceForeignKeyChanges)
at System.Data.Entity.Core.Objects.ObjectStateManager.PerformAdd(IEntityWrapper wrappedOwner, RelatedEnd relatedEnd, IEntityWrapper entityToAdd, Boolean isForeignKeyChange)
at System.Data.Entity.Core.Objects.ObjectStateManager.PerformAdd(IList1 entries) at System.Data.Entity.Core.Objects.ObjectStateManager.DetectChanges() at System.Data.Entity.Core.Objects.ObjectContext.DetectChanges() at System.Data.Entity.Internal.InternalContext.DetectChanges(Boolean force) at System.Data.Entity.Infrastructure.DbChangeTracker.HasChanges() at Samba.Infrastructure.Data.SqlData.EFWorkspace.HasChanges() at Samba.Persistance.Data.CachedDao.SafeSave[T](T entity) at Samba.Persistance.Data.CachedDao.CacheSave[T](T entity) at Samba.Persistance.Data.Dao.Save[T](T entity) at Samba.Persistance.Implementations.TicketDao.Save(Ticket ticket) at Samba.Services.Implementations.TicketModule.TicketServiceBase.SubmitTicket(Ticket ticket, TicketType ticketType, AppState appState) in C:\Users\vehbi\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\TicketModule\TicketServiceBase.cs:line 552 at Samba.Services.Implementations.TicketModule.TicketServiceBase.CloseTicket(Ticket ticket, AppState appState) in C:\Users\vehbi\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\TicketModule\TicketServiceBase.cs:line 570 at Samba.Presentation.Services.Implementations.TicketModule.TicketService.CloseTicket(Ticket ticket) at Samba.Presentation.Services.Implementations.TicketModule.TicketService.MoveOrders(Ticket ticket, Order[] selectedOrders, Int32 targetTicketId, Int32 targetTicketTypeId) at Samba.Presentation.ClientLibrary.Modules.PosModule.PosViewModel.OnTicketOperationRequested(EventParameters1 obj) in C:\Users\vehbi\Source\Repos\sambapos-v5-pro\Samba.Presentation.ClientLibrary\Modules\PosModule\PosViewModel.cs:line 179
at Microsoft.Practices.Prism.Events.EventSubscription1.InvokeAction(Action1 action, TPayload argument)
at Microsoft.Practices.Prism.Events.EventSubscription1.<>c__DisplayClass2.<GetExecutionStrategy>b__0(Object[] arguments) at Microsoft.Practices.Prism.Events.EventBase.InternalPublish(Object[] arguments) at Microsoft.Practices.Prism.Events.CompositePresentationEvent1.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
Samba.Services, Version=1.0.0.0
Samba.Domain, Version=1.0.0.0
Samba.Infrastructure.Data, Version=1.0.0.0
System.ComponentModel.Composition, Version=4.0.0.0
Samba.Presentation.Services, Version=1.0.0.0
System.Core, Version=4.0.0.0
PresentationCore, Version=4.0.0.0
WindowsBase, Version=4.0.0.0
DevExpress.Xpf.LayoutControl.v16.2, Version=16.2.13.0
System.Xml, Version=4.0.0.0
DevExpress.Xpf.Grid.v16.2, Version=16.2.13.0
System, Version=4.0.0.0
DevExpress.Xpf.Grid.v16.2.Core, Version=16.2.13.0
System.Xaml, 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
DevExpress.Xpf.Core.v16.2, Version=16.2.13.0
System.Windows.Forms, Version=4.0.0.0
System.Drawing, Version=4.0.0.0
Samba.Persistance, Version=1.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
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.v16.2, Version=16.2.13.0
WindowsInput, Version=1.0.4.0


[System Info]

Operating System
-Microsoft Windows 8.1 Pro
–CodeSet = 1252
–CSDVersion =
–CurrentTimeZone = 180
–FreePhysicalMemory = 2833556
–OSArchitecture = 64-bit
–OSLanguage = 2057
–ServicePackMajorVersion = 0
–ServicePackMinorVersion = 0
–Version = 6.3.9600

Machine
-SHOALACOUNTER
–Manufacturer = To be filled by O.E.M.
–Model = To be filled by O.E.M.
–TotalPhysicalMemory = 4186497024
–UserName = SHOALACOUNTER\SHOALA

This is day before yesterday

Application: SambaPOS
Version: 5.2.18
Region: en
DB: SQ
Machine: D2
User: DELIVERY2
Date: 17/01/2019
Time: 11:17

User Explanation:

DELIVERY2 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: Samba.Presentation.ClientLibrary
Stack Trace: at Samba.Presentation.ClientLibrary.Modules.PosModule.PosViewModel.OnEntitySelectedForTicket(EventParameters1 eventParameters) in C:\Users\vehbi\Source\Repos\sambapos-v5-pro\Samba.Presentation.ClientLibrary\Modules\PosModule\PosViewModel.cs:line 313 at Microsoft.Practices.Prism.Events.EventSubscription1.InvokeAction(Action1 action, TPayload argument) at Microsoft.Practices.Prism.Events.EventSubscription1.<>c__DisplayClass2.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
Samba.Services, Version=1.0.0.0
Samba.Domain, Version=1.0.0.0
Samba.Infrastructure.Data, Version=1.0.0.0
System.ComponentModel.Composition, Version=4.0.0.0
Samba.Presentation.Services, Version=1.0.0.0
System.Core, Version=4.0.0.0
PresentationCore, Version=4.0.0.0
WindowsBase, Version=4.0.0.0
DevExpress.Xpf.LayoutControl.v16.2, Version=16.2.13.0
System.Xml, Version=4.0.0.0
DevExpress.Xpf.Grid.v16.2, Version=16.2.13.0
System, Version=4.0.0.0
DevExpress.Xpf.Grid.v16.2.Core, Version=16.2.13.0
System.Xaml, 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
DevExpress.Xpf.Core.v16.2, Version=16.2.13.0
System.Windows.Forms, Version=4.0.0.0
System.Drawing, Version=4.0.0.0
Samba.Persistance, Version=1.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
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.v16.2, Version=16.2.13.0
WindowsInput, Version=1.0.4.0


[System Info]

Operating System
-Microsoft Windows 8.1 Pro
–CodeSet = 1252
–CSDVersion =
–CurrentTimeZone = 0
–FreePhysicalMemory = 1147016
–OSArchitecture = 64-bit
–OSLanguage = 2057
–ServicePackMajorVersion = 0
–ServicePackMinorVersion = 0
–Version = 6.3.9600

Machine
-D2
–Manufacturer = To be filled by O.E.M.
–Model = To be filled by O.E.M.
–TotalPhysicalMemory = 2039013376
–UserName = D2\DELIVERY2

Another system happened today

Application: SambaPOS
Version: 5.2.18
Region: en
DB: SQ
Machine: D2
User: DELIVERY2
Date: 13/01/2019
Time: 02:56

User Explanation:

DELIVERY2 said “”

[Exception Info 1]

Top-level Exception
Type: System.ComponentModel.Win32Exception
Message: The printer name is invalid
Source: Samba.Services
Stack Trace: at Samba.Services.Implementations.PrinterModule.Tools.PrinterHelper.GetPrinter(String szPrinterName) in C:\Users\vehbi\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\Tools\PrinterHelper.cs:line 13
at Samba.Services.Implementations.PrinterModule.Tools.LinePrinter.StartDocument() in C:\Users\vehbi\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\Tools\LinePrinter.cs:line 183
at Samba.Services.Implementations.PrinterModule.PrintJobs.SlipPrinterJob.DoPrint(AppState appState, String[] lines) in C:\Users\vehbi\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\PrintJobs\SlipPrinterJob.cs:line 21
at Samba.Services.Implementations.PrinterModule.PrintJobs.PrintJobCache.Print(AppState appState) in C:\Users\vehbi\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\PrintJobs\PrintJobFactory.cs:line 77
at Samba.Services.Implementations.PrinterModule.TicketPrinter.InternalPrint(AppState appState, Ticket ticket, PrintJob printJob, Func`2 orderSelector, Int32 copies) in C:\Users\vehbi\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\TicketPrinter.cs:line 82
at Samba.Services.Implementations.PrinterModule.TicketPrinter.<>c__DisplayClass17_0.b__0() in C:\Users\vehbi\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\TicketPrinter.cs:line 77
at Samba.Services.Implementations.PrinterModule.AsyncPrintTask.InternalExec(Action action, ILogService logService) in C:\Users\vehbi\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\AsyncPrintTask.cs:line 32


[Assembly Info]

mscorlib, Version=4.0.0.0
PresentationFramework, Version=4.0.0.0
PresentationCore, Version=4.0.0.0
System, Version=4.0.0.0
WindowsBase, Version=4.0.0.0
Samba.Services, Version=1.0.0.0
System.ComponentModel.Composition, Version=4.0.0.0
System.Configuration, Version=4.0.0.0
DevExpress.Xpf.Core.v16.2, Version=16.2.13.0
System.Xaml, Version=4.0.0.0
Microsoft.Practices.Prism.MefExtensions, Version=4.0.0.0
Samba.Presentation.Services, Version=1.0.0.0
Samba.Presentation.Common, Version=1.0.0.0
Samba.Domain, Version=1.0.0.0
Microsoft.Practices.Prism, Version=4.0.0.0
System.Core, Version=4.0.0.0
Samba.Infrastructure, Version=1.0.0.0
DevExpress.Data.v16.2, Version=16.2.13.0
Microsoft.Practices.ServiceLocation, Version=1.0.0.0
Samba.Localization, Version=1.0.0.0
Samba.Persistance, Version=1.0.0.0
FastButton, Version=1.0.0.0


[System Info]

Operating System
-Microsoft Windows 8.1 Pro
–CodeSet = 1252
–CSDVersion =
–CurrentTimeZone = 0
–FreePhysicalMemory = 966440
–OSArchitecture = 64-bit
–OSLanguage = 2057
–ServicePackMajorVersion = 0
–ServicePackMinorVersion = 0
–Version = 6.3.9600

Machine
-D2
–Manufacturer = To be filled by O.E.M.
–Model = To be filled by O.E.M.
–TotalPhysicalMemory = 2039013376
–UserName = D2\DELIVERY2


The last error is telling you the printer name is invalid. That’s pretty self explanatory.

The second error is saying something with an entity perhaps it’s missing an account transaction? Hard to tell.

You do know your running two different versions on each computer right?

But it not happening everytime.

It may not until it needs to print.

Does that make problems?

Um yes it’s probably why it was crashing in the first place and we asked you that but you said no. Obviously you are running two versions.

I am changing this to v5 question. This is not a Sambapos issue it’s a configuration issue and some mistakes you made with it. Sambapos is working correctly and it’s trying to tell you what you did wrong.

For us to help you we need more information about what you did. Those errors are specific to configuration mistakes.

Windows 8 is a horrible version. If you can upgrade to 10 I recommend it. That won’t solve your problems but I’m just sharing how aweful windows 8.1 is

@Jesse I had to configure a lot of custom stuffs to this customer to convince him. There is lot of rules and everything. Now I don’t even know what all is that. Now customer eating my head. Please help me out for fixing everything. I will pm you the db backup if u want.

I will try to upgrade to Windows 10.

No sorry I don’t have the time to fix another resellers problem. I can try and help you here but I suggest you study how it works more before you do custom work again.

Its fine I will try my best to learn it.

What should I do for this.

Well your in a tough spot. Did your customer pay you? If so you’re in a tough spot. I can’t help you there. You should be honest with them and decide if you want to continue or recommend them hire someone that is more knowledgeable.

In the future I would be careful selling a customer something that your not 100% confident you can do or support.