Concurrency

Concurrency

Postby halley73to » Fri 27 Nov 2009 14:38

Hi,
i'm trying to resolve concurrency situations in my application, but when i generate a concurrency situation and i call SubmitChanges on my DataContext i receive this exception.

What can be?

Ver. 5.35.54

System.NullReferenceException non è stata gestita
Message="Riferimento a un oggetto non impostato su un'istanza di oggetto."
Source="System.Data.Linq"
StackTrace:
in System.Data.Linq.Mapping.MetaAccessor`2.SetBoxedValue(Object& instance, Object value)
in Devart.Data.Linq.v.a(MetaType A_0, q A_1, Object A_2, ModifiedMemberInfo[] A_3, Boolean A_4)
in Devart.Data.Linq.f.a(b A_0, Object A_1, ModifiedMemberInfo[] A_2, Boolean A_3)
in Devart.Data.Linq.k.a(f A_0, b A_1, Boolean A_2)
in Devart.Data.Linq.k.a(DataContext A_0, ConflictMode A_1)
in Devart.Data.Linq.k.b(DataContext A_0, ConflictMode A_1)
in Devart.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode)
in Devart.Data.Linq.DataContext.SubmitChanges()
in MagazzinoBC.XtraForm_EditSettori.barLargeButtonItem_Salva_ItemClick(Object sender, ItemClickEventArgs e) in C:\Progetti\MagazzinoBC\MagazzinoBC\XtraForm_EditSettori.cs:riga 56
in DevExpress.XtraBars.BarItem.OnClick(BarItemLink link)
in DevExpress.XtraBars.BarItemLink.OnLinkClick()
in DevExpress.XtraBars.ViewInfo.BarSelectionInfo.UnPressLink(BarItemLink link)
in DevExpress.XtraBars.Controls.CustomLinksControl.OnMouseUp(MouseEventArgs e)
in System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
in System.Windows.Forms.Control.WndProc(Message& m)
in DevExpress.XtraBars.Controls.DockedBarControl.WndProc(Message& msg)
in System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
in System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
in System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
in System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
in System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
in System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
in System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
in MagazzinoBC.XtraForm_Tabelle_EditComplesso.ModificaRecord() in C:\Progetti\MagazzinoBC\MagazzinoBC\XtraForm_EditTabelle.cs:riga 176
in MagazzinoBC.XtraForm_Tabelle_EditComplesso.barLargeButtonItem_Modifica_ItemClick(Object sender, ItemClickEventArgs e) in C:\Progetti\MagazzinoBC\MagazzinoBC\XtraForm_EditTabelle.cs:riga 141
in DevExpress.XtraBars.BarItem.OnClick(BarItemLink link)
in DevExpress.XtraBars.BarItemLink.OnLinkClick()
in DevExpress.XtraBars.ViewInfo.BarSelectionInfo.UnPressLink(BarItemLink link)
in DevExpress.XtraBars.Controls.CustomLinksControl.OnMouseUp(MouseEventArgs e)
in System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
in System.Windows.Forms.Control.WndProc(Message& m)
in DevExpress.XtraBars.Controls.DockedBarControl.WndProc(Message& msg)
in System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
in System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
in System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
in System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
in System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
in System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
in MagazzinoBC.Program.Main() in C:\Progetti\MagazzinoBC\MagazzinoBC\Program.cs:riga 18
in System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
in System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
in Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
in System.Threading.ThreadHelper.ThreadStart()
InnerException:
halley73to
 
Posts: 29
Joined: Wed 07 Oct 2009 07:24

Postby halley73to » Fri 27 Nov 2009 15:28

I've discovered that this happen when i set the auto-sync property of the property of the entity to Always.
halley73to
 
Posts: 29
Joined: Wed 07 Oct 2009 07:24

Postby AndreyR » Mon 30 Nov 2009 16:32

Could you please send me (support * devart * com, subject "LINQ Concurrency NRE") a small test project illustrating the problem?
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16


Return to dotConnect for Oracle