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
180
Crash in data grid when adding rows in RecordExpanding
posted

This is very similar to the crash in the following thread that it says was fixed in 7.2.  I'm using 7.2.1007.

http://forums.infragistics.com/forums/p/4818/22778.aspx#22778

I've implemented a data grid with multiple levels that dynamically changes the collection during RecordExpanding so that rows appear without having to pre-read them.

The error is "An unhandled exception of type 'System.StackOverflowException' occurred in Infragistics3.Wpf.DataPresenter.v7.2.dll".  No additional details are available except that all entries in the stack are from code other than mine so I can't get back to the initial line that starts the overflow.

The collection is an IBindingList (as mentioned in the other thread), and has a hierarchy (subordinate IEnumerable fields).

While this occurs every time on a given data set (it's not intermitent), it doesn't happen with all the data sets.  I suspect a smaller sample app will not fail.

By the way, I have the hot fix in "NetAdvantage_WPF_20072_Hotfix_1007.zip" installed.  There is a later one in "NetAdvantage_WPF_Express_20072_Hotfix_1007.zip" that I did not install since I'm not using Express but the full version.  Is this right?

 Dave

Parents
  • 180
    posted

    Ok, I know a lot more about this than I did this morning.

    I've attached a file containing a small simulation of the problem.  Run it, and keep opening each expandable item.  Should crash when you try to expand item "Test6".  (That's not too many levels.)

    Basically, this is a depth of hierarchy problem.  If you create a deep enough hierarchy in the data grid, you are going to get to a stack overflow.  Kind of a tipping point is reached.  (Incidently, the treeview has a similar limitation.  It thinks you are in a loop if there is more than about 250 levels in it.  Try place a dependency object's visual tree in to a treeview.  Apress's Pro WPF book as a sample of how to do this. Doesn't take much of a tree to blow it up.)

    This seems to be an XBAP problem.  The same code does not crash in a Window (possibly the depth can be higher before it succumbs to the same limit.)

    I'll post it as a bug, but before I do, i'd like someone to confirm my results.

    Thanks.

     

    WpfBrowserApplication2.zip
Reply Children
No Data