ContextSwitchDeadlock when loading WPF RadGridControl via VirtualQueryableCollectionView

2 posts, 0 answers
  1. Paul Schwartzberg
    Paul Schwartzberg avatar
    4 posts
    Member since:
    Feb 2006

    Posted 06 Oct Link to this post

    Hello,

    I am getting the ContextSwitchDeadlock excepion when loading WPF RadGridControl with 100 000 rows via VirtualQueryableCollectionView using OData v4.

     

    I googled this.  I know the popular solution is to doesnt help to go to ctrl-Alt-E in VS, the exception settings window, and under Managed Debugging Assistants to uncheck/deactivate the ContextSwitchDeadlock option. 

    This doesnt prevent the exception it just means, it just means execution will continue, and the debugging session will not be interupted. 

    I am including a demo at this link:    .   When i run it with 100 000 in the table (just use the Inserting10000Customers.sql file in the root of the demo to load the table), it never comes back after this line nr 3 in the code below (from the demo).    The program just runs for minutes maybe hours.  Stuck at this line.    If my exceptions settings has ContextSwitchDeadlock activated it throws her the   ContextSwitchDeadLock exception.  

    Any ideas how to get the demo to work with 100 000 rows

     

     

     

     

     

    01.public partial class MainWindow
    02.    {
    03.        private static readonly Container Container = new Container(new Uri("http://localhost:21026/")); //http://localhost:21026/
    04.        public DataServiceCollection<CustomerDto> Customers = new DataServiceCollection<CustomerDto>(Container.Customers.IncludeTotalCount());
    05.        public MainWindow()
    06.        {
    07.            InitializeComponent();
    08. 
    09. 
    10.            IQueryable<CustomerDto> test = Customers.OrderBy(o => o.Name).AsQueryable();
    11.            var source = new VirtualQueryableCollectionView(test) { LoadSize = 1000 };
    12. 
    13.           // source.ItemsLoading += Source_ItemsLoading;
    14. 
    15.            DataContext = source;
    16. 
    17.        }
    18.}

  2. Paul Schwartzberg
    Paul Schwartzberg avatar
    4 posts
    Member since:
    Feb 2006

    Posted 06 Oct Link to this post

    The telerik & OData v4 solution (2 projects) for VS 2015, demo link, that i refered to above,  is at this link:

    https://app.box.com/s/73dufnlkf63se19ehhzfzz6upevbn92m

     

  3. DevCraft banner
Back to Top