Print Page | Close Window

Null Reference Exception

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2763
Printed Date: 02-May-2025 at 12:55am


Topic: Null Reference Exception
Posted By: gregweb
Subject: Null Reference Exception
Date Posted: 13-Jun-2011 at 5:00pm
I am getting a null reference exception, but I can't figure out what is going on.  The below is the stack trace.  In the Debug Windows, it shows that the Property "LastSynchronized" is being set.    The below line is what is shown in the Debug Windows, from the IB.Designer.cs file.  But neither "this" nor "Value" is null.
 

set { PropertyMetadata.LastSynchronized.SetValue(this, value); }

at IdeaBlade.EntityModel.EntityWrapper.SetValueWithChangeNotification(DataEntityProperty property, Object newValue)
   at IdeaBlade.EntityModel.EntityWrapper.IdeaBlade.EntityModel.IStructuralObject.SetValueWithChangeNotification(DataEntityProperty property, Object newValue)
   at IdeaBlade.EntityModel.DataEntityProperty`2.SetValueWithVerification(TInstance instance, TValue newValue)
   at IdeaBlade.EntityModel.DataEntityProperty`2.<.ctor>b__4(DataEntityPropertySetInterceptorArgs`2 args)
   at IdeaBlade.Core.PropertyInterceptor`3.HandleAction(Action`1 action, TArgs args)
   at IdeaBlade.Core.PropertyInterceptor`3.<BuildTargetedCombinedAction>b__3(TArgs args)
   at IdeaBlade.Core.PropertyInterceptor`3.ExecuteActions(TArgs args)
   at IdeaBlade.Core.PropertyInterceptor`3.SetValue(TInstance instance, Object context, TValue value)
   at IdeaBlade.Core.PropertyInterceptor`3.SetValue(TInstance instance, TValue value)
   at IdeaBlade.EntityModel.DataEntityProperty`2.SetValue(TInstance instance, TValue value)
   at Jet.Models.EmailFolderEntity.set_LastSynchronized(Nullable`1 value)
   at Jet.Views.EmailViewModel.RefreshFolder_Completed(Object sender, InvokeServerMethodEventArgs e)
   at IdeaBlade.EntityModel.BaseOperation`2.OnCompleted()
   at IdeaBlade.EntityModel.BaseOperation`2.IdeaBlade.EntityModel.IHasAsyncEventArgs.OnCompleted()
   at IdeaBlade.EntityModel.AsyncProcessor`1.<>c__DisplayClass2.<.ctor>b__0(TArgs args)
   at IdeaBlade.EntityModel.AsyncProcessor`1.Signal()
   at IdeaBlade.EntityModel.AsyncProcessor`1.<Execute>b__5(Object x)



Replies:
Posted By: gregweb
Date Posted: 13-Jun-2011 at 6:03pm
Never mind, I got this resolved.  It seems that it was not properly added to a EntityManager.  After call EntityManager.AddEntity(), it no longer gave this error.
 
Greg



Print Page | Close Window