NullReferenceException when updating DataTable bound to Spread

  • Bill Croteau 4 months, 2 weeks ago

    Spread v 10.40.20162.0
    Windows 10
    Visual Studio 2015

    I’m running into a NullReferenceException at:

    at FarPoint.Win.Spread.FpStatusBar.ActiveSheetView_PropertyChanged(Object sender, SheetViewPropertyChangeEventArgs e)
    at FarPoint.Win.Spread.SheetViewPropertyChangeEventHandler.Invoke(Object sender, SheetViewPropertyChangeEventArgs e)
    at FarPoint.Win.Spread.SheetView.FirePropertyChanged(String propertyName)
    at FarPoint.Win.Spread.SheetView.OnDataModelChanged(Object sender, SheetDataModelEventArgs e)
    at FarPoint.Win.Spread.Model.SheetDataModelEventHandler.Invoke(Object sender, SheetDataModelEventArgs e)
    at FarPoint.Win.Spread.Model.BaseSheetDataModel.OnChanged(SheetDataModelEventArgs e)
    at FarPoint.Win.Spread.Model.DefaultSheetDataModel.OnChanged(SheetDataModelEventArgs e)
    at FarPoint.Win.Spread.Model.DefaultSheetDataModel.a(Object A_0, ListChangedEventArgs A_1)
    at System.ComponentModel.ListChangedEventHandler.Invoke(Object sender, ListChangedEventArgs e)
    at System.Data.DataView.OnListChanged(ListChangedEventArgs e)
    at System.Data.DataView.IndexListChanged(Object sender, ListChangedEventArgs e)
    at System.Data.Listeners`1.Notify[T1,T2,T3](T1 arg1, T2 arg2, T3 arg3, Action`4 action)
    at System.Data.Index.OnListChanged(ListChangedEventArgs e)
    at System.Data.Index.FireResetEvent()
    at System.Data.DataTable.RestoreIndexEvents(Boolean forceReset)
    at System.Data.DataTable.AcceptChanges()
    at TSWizards.frmCWzGrainClassSummary.btnNext_Click(Object sender, EventArgs e) in D:\SVN_DATA\Geocosm\touchstone\TSWizards\frmCWzGrainClassSummary.vb:line 356
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
    at System.Windows.Forms.Button.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    I’ve thus far been unable to reproduce this error in a simple test case (this is embedded in an extremely convoluted scenario in our app) HOWEVER what I can say is that this exception is NOT thrown in v.9.35.20161.0 which we’ve just upgraded from… (I HAVE verified that the ONLY difference is the version of Spread).

    The error occurs when I call DataTable.AcceptChanges() on my DataTable – my SpreadView has as its datasource a DataView which is based on this DataTable

    Any ideas?

  • 122p
    Sean Lawyer122p 4 months, 2 weeks ago


    Are you using the new status bar feature? You could try setting StatusBarVisible = false and see if the problem goes away, to work around the issue temporarily. It sounds like a bug in the event handler logic related to that new feature. We will investigate here and see if we can reproduce the issue in a sample. What change(s) are you making to the data source when this error occurs?


Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to create new topics.