System.Reflection.TargetInvocationException

Hello!

I’m trying to set up a menu, but after adding the products when I go to add the categories and products to the menu I get the following message and the app crashes.

Anyone knows what may be happening?
Thanks in advance!


[General Info]

Application: SambaPOS
Version: 5.7.22
Region: es-ES
DB: TX
Machine: TPV1
User: TPVA
Date: 19/10/2025
Time: 19:48

User Explanation:

TPVA 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.Infrastructure.Data
Stack Trace: at Samba.Infrastructure.Data.CollectionIdUpdater.UpdateCollectionIds(String className, Int32 id, PropertyInfo propertyInfo, Object o, Func2 iDCreator) at Samba.Infrastructure.Data.CollectionIdUpdater.<>c__DisplayClass0_1.<UpdateCollectionIds>b__2(PropertyInfo x) at System.Collections.Generic.List1.ForEach(Action1 action) at Samba.Infrastructure.Data.CollectionIdUpdater.UpdateCollectionIds(String className, Int32 id, PropertyInfo propertyInfo, Object o, Func2 iDCreator)
at Samba.Infrastructure.Data.CollectionIdUpdater.<>c__DisplayClass0_1.b__2(PropertyInfo x)
at System.Collections.Generic.List1.ForEach(Action1 action)
at Samba.Infrastructure.Data.CollectionIdUpdater.UpdateCollectionIds(String className, Int32 id, PropertyInfo propertyInfo, Object o, Func2 iDCreator) at Samba.Infrastructure.Data.Text.IdFixer.<>c__DisplayClass0_2.<FixIdNumbers>b__1(PropertyInfo x) at System.Collections.Generic.List1.ForEach(Action1 action) at Samba.Infrastructure.Data.Text.IdFixer.FixIdNumbers(Dictionary2 items, Func2 iDCreator) at Samba.Infrastructure.Data.Text.TextFileWorkspace.PersistAllAsync(Object o) at Samba.Infrastructure.Data.Text.TextFileWorkspace.CommitChanges() at Samba.Presentation.Common.ModelBase.EntityCollectionViewModelBase2.<.ctor>b__0_3(EventParameters1 x) 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
System, Version=4.0.0.0
Samba.Services, Version=5.7.22.1016
Samba.Domain, Version=5.7.22.1016
Samba.Infrastructure.Data, Version=5.7.22.1016
System.ComponentModel.Composition, Version=4.0.0.0
Samba.Presentation.Services, Version=5.7.22.1016
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.7.22.1016
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.7.22.1016
Stateless, Version=1.0.0.0
PropertyTools, Version=2012.4.14.1
Samba.Localization, Version=5.7.22.1016
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 7 Professional
–CodeSet = 1252
–CSDVersion = Service Pack 1
–CurrentTimeZone = 120
–FreePhysicalMemory = 1865468
–OSArchitecture = 64 bits
–OSLanguage = 3082
–ServicePackMajorVersion = 1
–ServicePackMinorVersion = 0
–Version = 6.1.7601

Machine
-TPV1
–Manufacturer = WINCOR NIXDORF
–Model = BEETLE
–TotalPhysicalMemory = 3453149184
–UserName = TPV1\TPVA


It seems there is a problem with Entities. Did you change anything in Entities ?

I didn’t!

I checked and there’s two preestablished entities: Customers and Tables. I deleted them to see if that would work, but nothing.

Thanks for your reply!

Can you please send db backup directly to me : vehbi@sambapos.com