Hi,
Greetings for the day!
My screen displays a X-Y Series based chart using XamDataChart control (Assembly - InfragisticsWPF4.Controls.Charts.XamDataChart.v14.1.dll, v14.1.20141.2027).
As per my functional scenario I want to reload my chart when New & Save operation is performed on my screen. In this reload operation I create ScatterLineSeries instance in code behind and add it to XamDataChart.Series Collection. My screen has buttons respective to New and Save operation. When I try to click my New and Save button in sequence fairly quickly (i.e. keeping minimum possible delay between two operations), I get unhandled exception. Please check the stack strace at end of the post. I observed that this exception is happening due to TransitionDuration value set for ScatterLineSeries instance. Exception happens when this value is set to 1500 milliseconds. If I decrease it to 500 milliseconds then exception disappears.
Please elaborate to me on this XamDataChart-ScatterLineSeries behaviour. When I use 1500 milliseconds, I have to maintain some delay (time gap) between two button clicks (i.e. in between New and Save click), if I do it very quickly then I get this exception. And if I change TransitionDuration value to 500 milliseconds, then exception does not occur even if I click two buttons very quickly.
Stack Trace - System.NullReferenceException: Object reference not set to an instance of an object.
at Infragistics.Controls.Charts.ScatterLineSeries.<.ctor>b__0(OwnedPoint maxPoint, ScatterFrame minFrame, ScatterFrame maxFrame) at Infragistics.Controls.Charts.ScatterFrameBase`1.InterpolatePoint(OwnedPoint point, Single p, OwnedPoint minPoint, OwnedPoint maxPoint, T minFrame, T maxFrame) at Infragistics.Controls.Charts.DictInterpolator`3.Interpolate(IDictionary`2 target, Single p, IDictionary`2 min, IDictionary`2 max, TFrame minFrame, TFrame maxFrame) at Infragistics.Controls.Charts.ScatterFrameBase`1.Interpolate(Single p, Frame minFrame, Frame maxFrame) at Infragistics.Controls.Charts.ScatterBase.PropertyUpdatedOverride(Object sender, String propertyName, Object oldValue, Object newValue) at Infragistics.Controls.Charts.ScatterLineSeries.PropertyUpdatedOverride(Object sender, String propertyName, Object oldValue, Object newValue) at Infragistics.Controls.Charts.Series.<.ctor>b__4(Object o, PropertyUpdatedEventArgs e) at Infragistics.Controls.Charts.Series.RaisePropertyChanged(String propertyName, Object oldValue, Object newValue) at Infragistics.Controls.Charts.Series.<.cctor>b__1e(DependencyObject sender, DependencyPropertyChangedEventArgs e) at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e) at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e) at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args) at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType) at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal) at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value) at Infragistics.Controls.Charts.Series.set_TransitionProgress(Double value) at Infragistics.Controls.Charts.Series.Animator_PropertyChanged(Object sender, PropertyChangedEventArgs e) at Infragistics.DoubleAnimator.set_TransitionProgress(Double value) at Infragistics.DoubleAnimator.Tick() at Infragistics.DoubleAnimator.Update(Boolean flush) at Infragistics.DoubleAnimator.CompositionTarget_Rendering(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget) at System.Windows.Media.MediaContext.AnimatedRenderMessageHandler(Object resizedCompositionTarget) 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.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.Application.RunInternal(Window window) at System.Windows.Application.Run() at AvocetVM.App.Main() in d:\Avocet\Source\Workspaces\AvocetMain\Trunk\AvocetVM\obj\Debug\App.g.cs:line 0 at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() 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.Threading.ThreadHelper.ThreadStart()
Thanks & Regards,
Vinayak Nikam
Would you be able to provide the additional information requested? Do you still require assistance with this?
-Graham
Is there a way you could share some sample code for this? Or at least describe in more detail what the new and the save operations do? I suspect this may be a defect, but if you can provide a sample or enough information for us to reproduce, we can probably offer a work around that you can use in the short term, and it will help us to set up an issue report in our system.
My suspicion is that this may be rooted in taking a series out of the chart, or clearing its data source while it is in the process of animating. This shouldn't cause an exception, but you may have stumbled upon a scatter series specific issue with that sequence of events.
Can somebody please answer my queries asap. I am still stuck with the same issue.