This project is read-only.

"Object reference not set" at CustomDateTimeAxis.OverrideDataRange(Range`1 range)

Jan 25, 2010 at 7:13 PM

Hi Pedro,

I've been getting an exception on this last build (changeset 38990) and several builds before it. It happens on the PC that is running our dashboard and it only happens when running dual-monitors. It will run a single monitor without exception. It doesn't happen on my box. I can only reproduce it on that one PC. Here is the exception:

2010-01-25 09:48:39,306 [1] FATAL ScrumSprintMonitor.Wpf.Application.App [(null)] - Unhandled exception from System.Windows.Threading.Dispatcher
System.NullReferenceException: Object reference not set to an instance of an object.
   at System.Windows.Controls.DataVisualization.Charting.CustomDateTimeAxis.OverrideDataRange(Range`1 range)
   at System.Windows.Controls.DataVisualization.Charting.RangeAxis.b__6()
   at System.Windows.Controls.DataVisualization.Charting.RangeAxis.UpdateActualRange()
   at System.Windows.Controls.DataVisualization.Charting.RangeAxis.OnObjectRegistered(IAxisListener series)
   at System.Windows.Controls.DataVisualization.Charting.Axis.RegisteredListenersCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
   at System.Windows.Controls.DataVisualization.UniqueObservableCollection`1.InsertItem(Int32 index, T item)
   at System.Collections.ObjectModel.Collection`1.Add(T item)
   at System.Windows.Controls.DataVisualization.Charting.DataPointSeriesWithAxes.GetAxes(DataPoint firstDataPoint, Func`2 independentAxisPredicate, Func`1 independentAxisFactory, Func`2 dependentAxisPredicate, Func`1 dependentAxisFactory)
   at System.Windows.Controls.DataVisualization.Charting.LineSeries.GetAxes(DataPoint firstDataPoint)
   at System.Windows.Controls.DataVisualization.Charting.DataPointSeriesWithAxes.GetAxes()
   at System.Windows.Controls.DataVisualization.Charting.DataPointSeriesWithAxes.OnDataPointsChanged(IList`1 newDataPoints, IList`1 oldDataPoints)
   at System.Windows.Controls.DataVisualization.Charting.DataPointSingleSeriesWithAxes.OnDataPointsChanged(IList`1 newDataPoints, IList`1 oldDataPoints)
   at System.Windows.Controls.DataVisualization.Charting.LineAreaBaseSeries`1.OnDataPointsChanged(IList`1 newDataPoints, IList`1 oldDataPoints)
   at System.Windows.Controls.DataVisualization.Charting.DataPointSeries.LoadDataPoints(IEnumerable newItems, IEnumerable oldItems)
   at System.Windows.Controls.DataVisualization.Charting.DataPointSeries.Refresh()
   at System.Windows.Controls.DataVisualization.Charting.DataPointSeries.OnItemsSourceChanged(IEnumerable oldValue, IEnumerable newValue)
   at System.Windows.Controls.DataVisualization.Charting.DataPointSeries.OnItemsSourceChanged(DependencyObject o, 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, OperationType operationType)
   at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp)
   at System.Windows.Data.BindingExpression.Invalidate(Boolean isASubPropertyChange)
   at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
   at System.Windows.Data.BindingExpression.Activate(Object item)
   at System.Windows.Data.BindingExpression.AttachToContext(AttachAttempt attempt)
   at System.Windows.Data.BindingExpression.MS.Internal.Data.IDataBindEngineClient.AttachToContext(Boolean lastChance)
   at MS.Internal.Data.DataBindEngine.Task.Run(Boolean lastChance)
   at MS.Internal.Data.DataBindEngine.Run(Object arg)
   at MS.Internal.Data.DataBindEngine.OnLayoutUpdated(Object sender, EventArgs e)
   at System.Windows.ContextLayoutManager.fireLayoutUpdateEvent()
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)

Any thoughts?

Jan 26, 2010 at 4:46 PM

Hi bebo,

 

Can you try the 1.0.0.39156 build that is posted onhttp://teamcity.codebetter.com/repository/download/bt88/9184:id/ScrumSprintMonitor+1.0.0.39156.zip, and see if that fixes the exception?

Mar 12, 2010 at 2:36 PM

I realized I never responded back. I have downloaded the newest version and I am no longer getting this exception. Great work! Thanks Pedro!

Mar 12, 2010 at 6:10 PM

Glad to hear it fixed your problem.