Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
30
NullReferenceException in XamTimeline with XamDockManager when DataMapping property is set
posted

Friend,

I have been scratching my head since two days to fix this issue, that, i have XamTimeline control inside a dock panel of XamDockManager, where DataMapping property is set with the Time value of data collection. It throws null reference exception in 2 scenarios a) When dock panel is undocked ( this happens in my production environment ) b) On launch of the application ( this happens on my POC , this is POC i did to reproduce the error that i am getting in production environment ). In my production environment,  no issue till application is launched,  it throws exception when a dock panel in undocked first time, once released the panel after undock, then further moving the panel is not throwing exception. Below is my poc code, could you please someone advice me to solve this issue.  I can email my POC project if required. Thanks in advance.

My Code is


<igDock:SplitPane igDock:XamDockManager.InitialLocation="DockedRight">
<igDock:ContentPane x:Name="rightEdgeDock" Header="rightttt">
<!-- #BEGIN SNIPPET# -->
<ig:XamTimeline
x:Name="timeline"
Width="Auto"
Margin="50,0"
VerticalAlignment="Bottom">
<ig:XamTimeline.Axis>
<ig:DateTimeAxis ScrollPosition="0.55" ScrollScale=".45" />
</ig:XamTimeline.Axis>
<ig:XamTimeline.Series>
<ig:DateTimeSeries DataMapping="Time=Time" DataSource="{Binding DateCollection}" />
</ig:XamTimeline.Series>
</ig:XamTimeline>
<!-- #END SNIPPET# -->


</igDock:ContentPane>
</igDock:SplitPane>
</igDock:XamDockManager.Panes>
</igDock:XamDockManager>

and error trace is :

> InfragisticsWPF4.Controls.Timelines.XamTimeline.v16.2.dll!Infragistics.Controls.Timelines.TimelineSeries.GetEntries(double time)
InfragisticsWPF4.Controls.Timelines.XamTimeline.v16.2.dll!Infragistics.Controls.Timelines.XamTimeline.GetEntries(double time)
InfragisticsWPF4.Controls.Timelines.XamTimeline.v16.2.dll!Infragistics.Controls.Timelines.XamTimeline.ArrangeDetails()
InfragisticsWPF4.Controls.Timelines.XamTimeline.v16.2.dll!Infragistics.Controls.Timelines.Scene.ArrangeElements()
InfragisticsWPF4.Controls.Timelines.XamTimeline.v16.2.dll!Infragistics.Controls.Timelines.TimelineAxis.Axis_SizeChanged(object sender, System.Windows.SizeChangedEventArgs e)
PresentationFramework.dll!System.Windows.SizeChangedEventArgs.InvokeEventHandler(System.Delegate genericHandler, object genericTarget)
PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate handler, object target)
PresentationCore.dll!System.Windows.RoutedEventHandlerInfo.InvokeHandler(object target, System.Windows.RoutedEventArgs routedEventArgs)
PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source, System.Windows.RoutedEventArgs args, bool reRaised)
PresentationCore.dll!System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject sender, System.Windows.RoutedEventArgs args)
PresentationCore.dll!System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs e)
PresentationFramework.dll!System.Windows.FrameworkElement.OnRenderSizeChanged(System.Windows.SizeChangedInfo sizeInfo)
PresentationCore.dll!System.Windows.ContextLayoutManager.fireSizeChangedEvents()
PresentationCore.dll!System.Windows.ContextLayoutManager.UpdateLayout()
PresentationCore.dll!System.Windows.UIElement.UpdateLayout()
InfragisticsWPF4.Controls.Timelines.XamTimeline.v16.2.dll!Infragistics.Controls.Timelines.Scene.Axis.set(Infragistics.Controls.Timelines.TimelineAxis value)
InfragisticsWPF4.Controls.Timelines.XamTimeline.v16.2.dll!Infragistics.Controls.Timelines.Scene.OnApplyTemplate.AnonymousMethod__42_0()
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs)
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler)
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeImpl()
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(object state)
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state)
WindowsBase.dll!MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext executionContext, System.Threading.ContextCallback callback, object state)
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.Invoke()
WindowsBase.dll!System.Windows.Threading.Dispatcher.ProcessQueue()
WindowsBase.dll!System.Windows.Threading.Dispatcher.WndProcHook(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled)
WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled)
WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o)
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs)
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler)
WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs)
WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam)
[Native to Managed Transition]
[Managed to Native Transition]
WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame)
WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame frame)
PresentationFramework.dll!System.Windows.Application.RunDispatcher(object ignore)
PresentationFramework.dll!System.Windows.Application.RunInternal(System.Windows.Window window)
PresentationFramework.dll!System.Windows.Application.Run(System.Windows.Window window)
PresentationFramework.dll!System.Windows.Application.Run()
Chumma_WPF.exe!Chumma_WPF.App.Main()
[Native to Managed Transition]
[Managed to Native Transition]
mscorlib.dll!System.AppDomain.ExecuteAssembly(string assemblyFile, System.Security.Policy.Evidence assemblySecurity, string[] args)
Microsoft.VisualStudio.HostingProcess.Utilities.dll!Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state)
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state)
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart()

Thanks

Ravi.