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

Message queue is full....causing a not enough quota trap in application

1 Answer 407 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Phil
Top achievements
Rank 1
Phil asked on 25 Jun 2018, 05:37 PM

I came across a strange issue with the RadGridView and the message queue.  When my application first starts it displays a model dialog box (for licensing).  After leaving this dialog box displayed for a couple of minutes I closed the dialog box.  I then got a trap with the "not enough quota" error and the application crashed.

Running Spy++ shows that there are thousands of events being generated even when the application is sitting idle. 

The events are: ...[Registered: "DispatcherProcessQueue"] wParam:00000000 lParam:00000000

I can reproduce this in my application by including 1 RadGridView.  if I remove all RadGridViews the issue disappears.

The demo WPF application version R2 2018 also demonstrates the issue when you open up the GridView demo. 

The really strange part is that I an only reproduce this on a brand new computer running windows version 1803 (OS Build 17134.112).  

My old PC running windows version 1703 (OS Build 15063.1029) does not exhibit this issue at all.  There are some of the events shown above but not a flood of them.  Both my application and the WPF demo application run just fine. 

Attached is an image of the demo and the output of Spy++ running on the new PC.

 

Thanks,
Phil Young

 

 

 

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 28 Jun 2018, 09:54 AM
Hi Phil,

Indeed, the issue you are experiencing is quite strange. For the time being we have not received any reports for such problem. Just for the test, can you please check out whether the problem is reproducible with another  control? For example, is there any difference with the standard MS DataGrid? Is the problem still replicated, or it is related to RadGridView in particular?

Regards,
Stefan
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Christian
Top achievements
Rank 1
commented on 03 Jun 2022, 02:31 PM

Hi Stefan,

we have the same issue as Phil. It's definitely a RadGridView problem. Tried versions 2018.1.220 (purchased) and 2022.2.511 (latest, trial).

  1. Create new WPF project
  2. Add package reference to Telerik.Windows.Controls.GridView.for.Wpf
  3. Add RadGridView (empty, no columns, nothing) to MainWindow.xaml
  4. Build and run
  5. Start Spy++, attach to process, view messages.
    "DispatcherProcessQueue" messages are produced at a rate of ~10 messages per second.

  6. Now change you UI to have e. g. 10 RadGridView instances, now the message is also 10x

This is definitely a problem because our UI sporadically crashes with "Not enough quota" (meaning: "Windows message queue is full", more than 10.000 messages).

Repro/demo project is attached.

Please fix it!

 

Christian
Top achievements
Rank 1
commented on 03 Jun 2022, 03:22 PM

Finally found something: This is caused by the GridViewDataControl (base class) IsPropertyChangedAggregationEnabled property which is set to true by default. If it is true then RadGridView creates a 100 ms timer under the hood which calls Dispatcher.BeginInvoke with HandlePropertyChanged.
Martin Ivanov
Telerik team
commented on 07 Jun 2022, 06:57 AM

Thank you for sharing the project and your solution. Does setting the IsPropertyChangedAggregationEnabled property to false works for you?
Tags
GridView
Asked by
Phil
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or