This is a migrated thread and some comments may be shown as answers.

ContextSwitchDeadlock when loading WPF RadGridControl via VirtualQueryableCollectionView

1 Answer 98 Views
Integration with other products
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Paul Schwartzberg
Top achievements
Rank 1
Paul Schwartzberg asked on 06 Oct 2016, 12:20 PM

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.}

1 Answer, 1 is accepted

Sort by
0
Paul Schwartzberg
Top achievements
Rank 1
answered on 06 Oct 2016, 12:30 PM

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

 

Tags
Integration with other products
Asked by
Paul Schwartzberg
Top achievements
Rank 1
Answers by
Paul Schwartzberg
Top achievements
Rank 1
Share this question
or