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

Hang, crash with OData Service

4 Answers 137 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Wayne
Top achievements
Rank 1
Wayne asked on 14 Jun 2012, 08:02 PM
I'm evaluating RadGridView (WPF) with an OData service. Version 2012.2.607.40
Seeing some very strange behavior with a simple application.

My service schema exposes:

ResourceSetA (1 item)
ResourceSetB (3 items)
ResourceSetC (6713 items)

I'm monitoring calls to the service with Fiddler2.

I have a simple test app with a RadGridView in a Window by itself, its ItemsSource bound to a DataServiceQuery<T> property from my service client proxy.

When T=ResourceA, the service calls are essentially:

/Service.svc/ResourceSetA()/$count
/Service.svc/ResourceSetA()?$skip=0&$top=1

and the grid displays the single item correctly.

When T=ResourceB, the service calls are:

/Service.svc/ResourceSetB()/$count
/Service.svc/ResourceSetB()?$skip=0&$top=3

and the grid displays three items correctly.

When T=ResourceC, I only see a single call, which appears to return the correct count according to Fiddler (6713):

/Service.svc/ResourceSetC()/$count

but my client application hangs and makes no further OData calls. Watching the process in Task Manager, it eats memory steadily and eventually falls over with an OutOfMemoryException.

My app is really the simplest example I can craft, and my service is responding correctly when I issue calls to it directly from a browser.
What could I be doing wrong here? 

4 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 15 Jun 2012, 07:37 AM
Hello,

Unfortunately, we cannot guess what is going on on your end.

Have your tried the RadDataServiceDataSource control?

We could not reproduce such a behavior on our online examples. All OData calls are correct and working.

I have also attached a working sample project. You can check it out. If you can modify my sample project so it does reproduce the problem, please send it back to us for debugging.

All the best,
Ross
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Wayne
Top achievements
Rank 1
answered on 15 Jun 2012, 01:50 PM
Thanks for the sample. It works fine with the provided Northwind dataset. Here's what I did:

Several of the tables in my service have 6000+ rows. 
When I query my service directly in a browser, I get good responses back (even if I query for the entire 6000 items - takes a second or so).

I added my OData service as a service reference in the sample code you provided, and changed the RadDataServiceDataSource to query one of the large tables from my service. For several of those tables, the app works as expected. For some of the tables, however, the app hangs (the spinning circle never stops, no data is displayed, and the status box shows "--> Requesting http://host:port/service/table()?$top=10&$inlinecount=allpages", but never displays a return timing report). If I look at the same request in Fiddler, it shows HTTP 200 OK and the data returned looks fine. Indeed, if I issue that same query from a browser it returns the correct data.

Interestingly, when I run your sample app for a table that works, the "RadControls for WPF Trial" nag dialog shows up only once. When I run it for a table that causes the hang, it must be dismissed twice before the app hangs.

Could there be something about the actual data content being returned that is causing issues with the control?
0
Rossen Hristov
Telerik team
answered on 15 Jun 2012, 02:11 PM
Hi,

That is really weird indeed.

The only thing that RadDataServiceDataSource does is to append Where's, OrderBy's, Skip's and Take's to the DataServiceQuery<T> and then load it.

Can you eliminate our control from the picture and append these to the query manually and then try to load it. In other words, load the query by hand and when (if that is) the data comes back load it in the standard grid or a listbox. In other words, imagine that you were not using Telerik controls at all, but only the stock ones -- is the behavior different or is it the same?

Unfortunately, without being able to reproduce this behavior on our end, there is little we can do to guess what is causing it.

All the best,
Ross
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Wayne
Top achievements
Rank 1
answered on 15 Jun 2012, 05:01 PM
I think I've found the issue. The data that is being returned from the service contains certain null property values for properties defined by the schema of the service as not nullable. The exception that this generates on the client-side appears to be being swallowed somewhere inside the proxy/context (I could only detect this when turning on first-chance exeptions). I guess that in this case, although it appears to the service as though the response was sent correctly, to the UI a response was never received. Note sure whether or not the controls are supposed to be able to deal with that more effectively.
Tags
GridView
Asked by
Wayne
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Wayne
Top achievements
Rank 1
Share this question
or