1

Topic: [WPF] Dispatcher processing has been suspended, but messages

Exception: Dispatcher processing has been suspended, but messages are still being processed In Google everywhere write that it happens at show MessageBox or at usage  WebBrowser. At the moment of an error the user does not make any actions. Are not shown neither MessageBox', nor WebBrowser'. Dialog boxes too are not shown. In  only internal calls WPF. Why still there can be this error?

2

Re: [WPF] Dispatcher processing has been suspended, but messages

Hello, igor-booch, you wrote: IB> At the moment of an error the user does not make any actions. Are not shown neither MessageBox', nor WebBrowser'. Dialog boxes too are not shown. Someone tries to change VisualTree during time  (a source). IB> In  only internal calls WPF. I do not see .

3

Re: [WPF] Dispatcher processing has been suspended, but messages

S> Someone tries to change VisualTree during time  (source). Yes, at me the data from a DB in a background is loaded and then properties are appropriated (INotifyPropertyChanged) and collections change (INotifyCollectionChanged) in Dispatcher. Invoke (action, Priority. Background). Thus to properties and collections go  WPF. Under your link it turns out that Dispatcher. BeginInvoke rescues. But some years ago had a bitter experience with Dispatcher. BeginInvoke, at  queue and application was overflowed hung. The problem "Dispatcher processing has been suspended" met to me while only on 1 computer. On others 3 never such error arose never. The same application. And the problem arose in flow of first several starts on a problem computer. Then disappeared. To play back a smog not any more. The computer thus did not reboot. Other applications did not stop. Probably when users will work a problem will be shown.

4

Re: [WPF] Dispatcher processing has been suspended, but messages

IB> Yes, at me the data from a DB in a background is loaded IB> and then properties are appropriated (INotifyPropertyChanged) and collections change (INotifyCollectionChanged) in Dispatcher. Invoke (action, Priority. Background). Thus to properties and collections go  WPF. IB> Under your link it turns out that Dispatcher. BeginInvoke rescues. IB> but some years ago had a bitter experience with Dispatcher. BeginInvoke, at  queue and application was overflowed hung. IB> the problem "Dispatcher processing has been suspended" met to me while only on 1 computer. On others 3 never such error arose never. The same application. And the problem arose in flow of first several starts on a problem computer. Then disappeared. To play back a smog not any more. The computer thus did not reboot. Other applications did not stop. Probably when users will work a problem will be shown. Most likely and will chaotically fall depending on how much simultaneously there something happens. BeginInvoke it is correct in the present state of affairs. That did not hang, is better to think over architecture. I.e. if many small notification messages - that somehow them to group and UI to update once, instead of on everyone . Or to store DispatcherOperation, returned of BeginInvoke and if already active update is suspended, other notification messages simply to pass, etc.

5

Re: [WPF] Dispatcher processing has been suspended, but messages

N> That did not hang, is better to think over architecture. I.e. if many small notification messages - that somehow them to group and UI to update once, instead of on everyone . If to increase the size of the notification message, that is probability that the user will note  UI. The problem is shown only on some computers. Can twist any adjustments Windows?

6

Re: [WPF] Dispatcher processing has been suspended, but messages

IB> If to increase the size of the notification message, that is probability that the user will note  UI. IB> the Problem is shown only on some computers. Can twist any adjustments Windows? I even did not begin to think of it. Well i.e. a problem with a multithreading, what adjustments in Windows can be twisted, that it remained to work like clock-work, but spat on synchronization? Application here should be twisted. I.e. purely hypothetically, we assume at you on the screen  in which cells are updated in rial-time. And as something  most likely changes arrive many times in a second. What the critical changes from the point of view of the ultimate user if you update not each time, and for example on the timer of times in 500 milliseconds or second?  most likely ceases. Or the most frequent scenario when at loading of the data  it is updated on change of each data field. I.e. You think, what you change one cell, and except it that else is updated much, whether  is enumerated etc. it Is necessary actually, or if 100 records from basis are read easier to read them, and then UI to Update once? I.e. if at the beginning of data reading from basis to disconnect all notification messages and as stopped to read - to update all at once normally it treats the majority of problems with hang. And that by it it is not treated - it is necessary to search . Otherwise you do not solve a problem, and hide to a pore. Adjustments Windows here hardly help. Always there will be a user at which bad videocard and only software rendering, or on the contrary many very fast processors.